2021-08-24 17:55:37 +02:00
|
|
|
stages:
|
|
|
|
- build
|
2021-08-24 18:20:37 +02:00
|
|
|
- test
|
2021-08-24 18:15:35 +02:00
|
|
|
#running the bash script in test
|
2021-08-24 17:55:37 +02:00
|
|
|
|
2021-08-24 18:20:37 +02:00
|
|
|
build_and_push:
|
2021-08-24 17:55:37 +02:00
|
|
|
image: registry.gitlab.com/grassrootseconomics/cic-base-images:python-3.8.6-dev
|
|
|
|
stage: build
|
|
|
|
variables:
|
|
|
|
#CI_DEBUG_TRACE: "true"
|
|
|
|
CIC_PACKAGE_REGISTRY_PROJECT_ID: 27624814
|
|
|
|
script:
|
|
|
|
#- python -m pip install --upgrade setuptools wheel pip twine semver
|
|
|
|
- python -m pip install --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple --extra-index-url https://pip.grassrootseconomics.net:8433 install -r requirements.txt
|
|
|
|
- python setup.py sdist bdist_wheel
|
2021-08-24 18:27:36 +02:00
|
|
|
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --skip-existing --repository-url ${CI_API_V4_URL}/projects/${CIC_PACKAGE_REGISTRY_PROJECT_ID}/packages/pypi dist/*
|
2021-08-24 17:55:37 +02:00
|
|
|
# Below are the built dependencies
|
|
|
|
#- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CIC_PACKAGE_REGISTRY_PROJECT_ID}/packages/pypi /tmp/wheelhouse/*
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- daven/*
|
|
|
|
|
2021-08-24 18:20:37 +02:00
|
|
|
tests:
|
2021-08-24 18:15:35 +02:00
|
|
|
image: registry.gitlab.com/grassrootseconomics/cic-base-images:python-3.8.6-dev
|
|
|
|
stage: test
|
|
|
|
variables:
|
|
|
|
#CI_DEBUG_TRACE: "true"
|
|
|
|
CIC_PACKAGE_REGISTRY_PROJECT_ID: 27624814
|
|
|
|
script:
|
2021-08-24 18:17:57 +02:00
|
|
|
- ls
|
2021-08-24 18:22:40 +02:00
|
|
|
- python -m pip install --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple --extra-index-url https://pip.grassrootseconomics.net:8433 install -r requirements.txt
|
2021-08-24 18:17:57 +02:00
|
|
|
- bash run_tests.sh
|
2021-08-24 18:15:35 +02:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- daven/*
|
|
|
|
|
2021-08-24 18:20:37 +02:00
|
|
|
# rules:
|
|
|
|
# - if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
|
|
|
2021-08-24 18:15:35 +02:00
|
|
|
|
|
|
|
|