Extract conda activation into before_script

[skip ci]
This commit is contained in:
usov_i 2024-09-05 11:11:40 +02:00
parent a55295829f
commit 8604d695c6

View File

@ -3,12 +3,15 @@ stages:
- deploy
- cleanup
default:
before_script:
- source /opt/miniconda3/etc/profile.d/conda.sh
build-and-publish:
stage: build-and-publish
rules:
- if: $CI_COMMIT_TAG
script:
- source /opt/miniconda3/etc/profile.d/conda.sh
- conda config --add channels conda-forge
- conda config --set solver libmamba
- conda config --set anaconda_upload yes
@ -22,7 +25,6 @@ deploy-test:
script:
- cd /opt/pyzebra
- git pull origin main --tags
- source /opt/miniconda3/etc/profile.d/conda.sh
- conda activate test
- conda build ./conda-recipe
- conda install --use-local --only-deps pyzebra -y
@ -37,7 +39,6 @@ deploy-prod:
when: delayed
start_in: 1 minute
script:
- source /opt/miniconda3/etc/profile.d/conda.sh
- conda activate prod
- conda update pyzebra -y
- sudo systemctl restart pyzebra-prod.service