Skip to content
Snippets Groups Projects
Commit 0a677a67 authored by Katleho Madisa's avatar Katleho Madisa
Browse files

Merge branch 'sar-255/Publish-package-to-CAR' into 'master'

SAR-255 Publish packages to the artefact.skao.int repository

See merge request ska-telescope/ska-ser-logging!11
parents 9cc633cc 346486ef
No related branches found
No related tags found
No related merge requests found
# GitLab CI in conjunction with GitLab Runner can use Docker Engine to test and build any application.
# Docker, when used with GitLab CI, runs each job in a separate and isolated container using the predefined image that is set up in .gitlab-ci.yml.
# In this case we use the latest python docker image to build and test this project.
image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest
image: $SKA_K8S_TOOLS_DEPLOY_IMAGE
# cache is used to specify a list of files and directories which should be cached between jobs. You can only use paths that are within the project workspace.
# If cache is defined outside the scope of jobs, it means it is set globally and all jobs will use that definition
......@@ -24,23 +24,11 @@ stages:
# You can specify an unlimited number of jobs which are defined as top-level elements with an arbitrary name and always
# have to contain at least the script clause.
build wheel:
stage: build
tags:
- k8srunner
script:
- python3 setup.py sdist bdist_wheel
artifacts:
paths:
- ./dist/
# The test job produces a coverage report and the unittest output (see setup.cfg), and
# the coverage xml report is moved to the reports directory while the html output is persisted for use by the pages
# job. TODO: possibly a candidate for refactor / renaming later on.
test:
stage: test
# tags:
# - k8srunner
script:
- pipenv run python3 setup.py test
- mv coverage.xml ./build/reports/code-coverage.xml
......@@ -65,7 +53,7 @@ list_dependencies:
- public
linting:
image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest
image: $SKA_K8S_TOOLS_DEPLOY_IMAGE
tags:
- k8srunner
stage: linting
......@@ -76,28 +64,6 @@ linting:
paths:
- ./build
publish to nexus:
stage: publish
tags:
- k8srunner
variables:
TWINE_USERNAME: $TWINE_USERNAME
TWINE_PASSWORD: $TWINE_PASSWORD
script:
# Note: katversion will include the git hash in the version for non-tagged commits, but need git
# Check metadata requirements
- scripts/validate-metadata.sh
- python3 -m pip install twine
- twine upload --repository-url $PYPI_REPOSITORY_URL dist/*
only:
refs:
- tags
variables:
# Confirm tag message exists
- $CI_COMMIT_MESSAGE =~ /^.+$/
# Confirm semantic versioning of tag
- $CI_COMMIT_TAG =~ /^((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$/
pages:
stage: deploy
tags:
......@@ -115,18 +81,8 @@ pages:
- public
expire_in: 30 days
create ci metrics:
stage: .post
image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest
when: always
tags:
- k8srunner
script:
# Gitlab CI badges creation: START
- apt-get -y update
- apt-get install -y curl --no-install-recommends
- curl -s https://gitlab.com/ska-telescope/ci-metrics-utilities/raw/master/scripts/ci-badges-func.sh | sh
# Gitlab CI badges creation: END
artifacts:
paths:
- ./build
include:
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/build_wheel.yml'
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/post_step.yml'
......@@ -5,6 +5,11 @@ Change Log
All notable changes to this project will be documented in this file.
This project adheres to `Semantic Versioning <http://semver.org/>`_.
v4.0.1
******
No change, moving artefacts to a new repository https://artefact.skao.int/.
v0.4.0
******
......
[[source]]
url = "https://nexus.engageska-portugal.pt/repository/pypi-proxy/simple"
url = "https://artefact.skao.int/repository/pypi-all/simple"
verify_ssl = true
name = "nexus-proxy"
[[source]]
url = "https://nexus.engageska-portugal.pt/repository/pypi/simple"
verify_ssl = true
name = "nexus-hosted"
name = "skao"
[packages]
docutils = "*"
......
......@@ -18,7 +18,7 @@ def reset_logging():
yield
manager = logging.root.manager
manager.disabled = logging.NOTSET
for logger in list(manager.loggerDict.values()) + [logging.root]:
for logger in list(manager.loggerDict.values()) + [logging.root]: # pylint: disable=no-member
if isinstance(logger, logging.Logger):
logger.setLevel(logging.NOTSET)
logger.propagate = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment