5
5
- build
6
6
- publish
7
7
- publish-docker-description
8
+ - deploy
8
9
9
10
variables :
10
11
GIT_STRATEGY : fetch
@@ -77,6 +78,17 @@ default:
77
78
# this job runs only on nightly pipeline with the mentioned variable, against `master` branch
78
79
- if : $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly"
79
80
81
+ .deploy-refs : &deploy-refs
82
+ rules :
83
+ - if : $CI_PIPELINE_SOURCE == "pipeline"
84
+ when : never
85
+ - if : $SCHEDULED_JOB
86
+ when : never
87
+ - if : $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
88
+ when : manual
89
+ - if : $CI_COMMIT_REF_NAME =~ /^v[0-9]{4}-[0-9]{2}-[0-9]{2}.*$/ # i.e. v2021-09-27, v2021-09-27-1
90
+ when : manual
91
+
80
92
.nightly-test : &nightly-test
81
93
rules :
82
94
# 2. another is triggered by scripts repo $CI_PIPELINE_SOURCE == "pipeline" it's for the CI image
@@ -360,4 +372,27 @@ dockerhub-bridges-common-relay:
360
372
variables :
361
373
SHORT_DESCRIPTION : " bridges-common-relay"
362
374
363
- # FIXME: publish binaries
375
+ # FIXME: publish binaries
376
+
377
+ deploy-bridges-common-relay-testnet :
378
+ << : *deploy-refs
379
+ needs :
380
+ - job : bridges-common-relay
381
+ stage : deploy
382
+ image : argoproj/argocd:v2.5.5
383
+ environment : parity-testnet
384
+ variables :
385
+ ARGOCD_OPTS : --grpc-web --grpc-web-root-path /parity-testnet
386
+ APP : bridges-common-relay
387
+ before_script :
388
+ - if [[ "${CI_COMMIT_TAG}" ]]; then
389
+ VERSION=${CI_COMMIT_TAG};
390
+ elif [[ "${CI_COMMIT_REF_NAME}" ]]; then
391
+ VERSION=$(echo ${CI_COMMIT_REF_NAME} | sed -r 's#/+#-#g');
392
+ fi
393
+ script :
394
+ - echo "Starting deploy version=${VERSION}"
395
+ - argocd app list
396
+ - argocd app set $APP --helm-set bridges-common-relay.image.tag=$VERSION
397
+ - argocd app sync $APP
398
+ - argocd app wait $APP --timeout 120
0 commit comments