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