Update .gitlab-ci.yml
This commit is contained in:
parent
31b4b0bb5f
commit
0fee06f2d6
@ -15,20 +15,29 @@ build-and-publish:
|
||||
|
||||
deploy-test:
|
||||
stage: deploy
|
||||
environment: testing
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
script:
|
||||
- cd /opt/pyzebra
|
||||
- git pull origin master --tags
|
||||
- source /opt/miniconda3/etc/profile.d/conda.sh
|
||||
- conda activate test
|
||||
- conda build ./conda-recipe
|
||||
- conda install --use-local --only-deps pyzebra -y
|
||||
- conda build purge-all
|
||||
- sudo systemctl restart pyzebra-test.service
|
||||
|
||||
deploy-prod:
|
||||
stage: deploy
|
||||
environment: production
|
||||
needs: ["build-and-publish"]
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: delayed
|
||||
start_in: 5 seconds
|
||||
script:
|
||||
- source /opt/miniconda3/etc/profile.d/conda.sh
|
||||
- conda activate prod
|
||||
- conda update pyzebra -y
|
||||
- sudo systemctl restart pyzebra.service
|
||||
- sudo systemctl restart pyzebra-prod.service
|
||||
|
Loading…
x
Reference in New Issue
Block a user