Extract conda activation into before_script
[skip ci]
This commit is contained in:
parent
a55295829f
commit
8604d695c6
@ -3,12 +3,15 @@ stages:
|
|||||||
- deploy
|
- deploy
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
|
default:
|
||||||
|
before_script:
|
||||||
|
- source /opt/miniconda3/etc/profile.d/conda.sh
|
||||||
|
|
||||||
build-and-publish:
|
build-and-publish:
|
||||||
stage: build-and-publish
|
stage: build-and-publish
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_TAG
|
- if: $CI_COMMIT_TAG
|
||||||
script:
|
script:
|
||||||
- source /opt/miniconda3/etc/profile.d/conda.sh
|
|
||||||
- conda config --add channels conda-forge
|
- conda config --add channels conda-forge
|
||||||
- conda config --set solver libmamba
|
- conda config --set solver libmamba
|
||||||
- conda config --set anaconda_upload yes
|
- conda config --set anaconda_upload yes
|
||||||
@ -22,7 +25,6 @@ deploy-test:
|
|||||||
script:
|
script:
|
||||||
- cd /opt/pyzebra
|
- cd /opt/pyzebra
|
||||||
- git pull origin main --tags
|
- git pull origin main --tags
|
||||||
- source /opt/miniconda3/etc/profile.d/conda.sh
|
|
||||||
- conda activate test
|
- conda activate test
|
||||||
- conda build ./conda-recipe
|
- conda build ./conda-recipe
|
||||||
- conda install --use-local --only-deps pyzebra -y
|
- conda install --use-local --only-deps pyzebra -y
|
||||||
@ -37,7 +39,6 @@ deploy-prod:
|
|||||||
when: delayed
|
when: delayed
|
||||||
start_in: 1 minute
|
start_in: 1 minute
|
||||||
script:
|
script:
|
||||||
- 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-prod.service
|
- sudo systemctl restart pyzebra-prod.service
|
||||||
|
Loading…
x
Reference in New Issue
Block a user