Commit 33480672 authored by Luc Yriarte's avatar Luc Yriarte
Browse files

Merge branch 'deploy_dev' into 'master'

Development packages support

See merge request !5
parents 010cf57e 48892f1d
Pipeline #35534 passed with stage
in 25 seconds
......@@ -13,8 +13,10 @@ stages:
build:
stage: test
script:
- echo ---- ---- ---- BUILD IMAGE ---- ---- ----
- pip3 install -r requirements.txt
- pip3 install -r requirements_dev.txt
- echo ---- ---- ---- UNIT TESTS ---- ---- ----
- pytest test --junitxml=report.xml
artifacts:
when: always
......@@ -25,9 +27,30 @@ build:
deploylib:
stage: deploy
script:
- echo ---- ---- ---- BUILD IMAGE ---- ---- ----
- pip3 install -r requirements.txt
- pip3 install twine
- python3 setup.py sdist bdist_wheel
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=${CI_REGISTRY_USER} python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${WDMS_LIB_REGISTRY}/packages/pypi dist/*
rules:
- if: $CI_COMMIT_BRANCH == 'master'
# Pushes merge request builds to the feed
deploydev:
stage: deploy
script:
- pip3 install -r requirements.txt
- echo ---- ---- ---- SET DEVELOPMENT VERSION ---- ---- ----
- PACKAGE_VERSION_FILE='setup.py'
- PACKAGE_NAME=$(python setup.py --name)
- PACKAGE_LIB_VERSION=$(python setup.py --version)
- PACKAGE_DEV_VERSION=${PACKAGE_LIB_VERSION}.dev${CI_JOB_ID}
- sed -i "s/^VERSION[ ]*\=[ ]*\"${PACKAGE_LIB_VERSION}\"/VERSION = \"${PACKAGE_DEV_VERSION}\"/" ${PACKAGE_VERSION_FILE}
- echo ---- ---- ---- BUILD IMAGE ---- ---- ----
- pip3 install twine
- python3 setup.py sdist bdist_wheel
- echo ---- ---- ---- PUSHING DEVELOPMENT PACKAGE ${PACKAGE_DEV_VERSION} TO PROJECT ${WDMS_LIB_REGISTRY} REGISTRY ---- ---- ----
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=${CI_REGISTRY_USER} python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${WDMS_LIB_REGISTRY}/packages/pypi dist/*
only:
- merge_requests
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment