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
Branches
Tags 0.4.1
No related merge requests found
# GitLab CI in conjunction with GitLab Runner can use Docker Engine to test and build any application. # 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. # 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. # 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. # 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 # 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: ...@@ -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 # 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. # 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 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 # 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. # job. TODO: possibly a candidate for refactor / renaming later on.
test: test:
stage: test stage: test
# tags:
# - k8srunner
script: script:
- pipenv run python3 setup.py test - pipenv run python3 setup.py test
- mv coverage.xml ./build/reports/code-coverage.xml - mv coverage.xml ./build/reports/code-coverage.xml
...@@ -65,7 +53,7 @@ list_dependencies: ...@@ -65,7 +53,7 @@ list_dependencies:
- public - public
linting: linting:
image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest image: $SKA_K8S_TOOLS_DEPLOY_IMAGE
tags: tags:
- k8srunner - k8srunner
stage: linting stage: linting
...@@ -76,28 +64,6 @@ linting: ...@@ -76,28 +64,6 @@ linting:
paths: paths:
- ./build - ./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: pages:
stage: deploy stage: deploy
tags: tags:
...@@ -115,18 +81,8 @@ pages: ...@@ -115,18 +81,8 @@ pages:
- public - public
expire_in: 30 days expire_in: 30 days
create ci metrics: include:
stage: .post - project: 'ska-telescope/templates-repository'
image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest file: 'gitlab-ci/includes/build_wheel.yml'
when: always - project: 'ska-telescope/templates-repository'
tags: file: 'gitlab-ci/includes/post_step.yml'
- 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
...@@ -5,6 +5,11 @@ Change Log ...@@ -5,6 +5,11 @@ Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to `Semantic Versioning <http://semver.org/>`_. 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 v0.4.0
****** ******
......
[[source]] [[source]]
url = "https://nexus.engageska-portugal.pt/repository/pypi-proxy/simple" url = "https://artefact.skao.int/repository/pypi-all/simple"
verify_ssl = true verify_ssl = true
name = "nexus-proxy" name = "skao"
[[source]]
url = "https://nexus.engageska-portugal.pt/repository/pypi/simple"
verify_ssl = true
name = "nexus-hosted"
[packages] [packages]
docutils = "*" docutils = "*"
......
...@@ -18,7 +18,7 @@ def reset_logging(): ...@@ -18,7 +18,7 @@ def reset_logging():
yield yield
manager = logging.root.manager manager = logging.root.manager
manager.disabled = logging.NOTSET 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): if isinstance(logger, logging.Logger):
logger.setLevel(logging.NOTSET) logger.setLevel(logging.NOTSET)
logger.propagate = True logger.propagate = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment