-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
31 lines (27 loc) · 1016 Bytes
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
pool:
name: Mordor
trigger:
branches:
include:
- main
tags:
include:
- 'v*.*.*'
variables:
hosts_qual: "$(clustersIPS)"
hosts_prod: "$(clustersIPS)"
packages: "git+https://informatique:rxf4qdzjc5pccj2423ycuedtyma3ughg6e2oepohoc7oilbbjukq@dev.azure.com/Oeilnc/Bilbo/_git/bilbo-packages"
steps:
- script: |
echo "Branche : $(Build.SourceBranchName)"
prod_arg=""
hosts=$(hosts_qual)
if [[ $(Build.SourceBranchName) != "main" ]]; then prod_arg="--prod"; hosts=$(hosts_prod); fi
/azp/deploy.sh conda ${prod_arg} --hosts ${hosts} --packages $(packages)
if [[ $? != 0 ]]; then echo "Erreur rencontrée, arrêt du déploiement..."; exit 1; fi
/azp/deploy.sh worker ${prod_arg} --hosts ${hosts}
displayName: "Maj du package sur les environnements Conda"