|
@@ -73,12 +73,10 @@ pipeline {
|
|
|
for (String item : service_update.split()) {
|
|
|
try{
|
|
|
echo "Updating $item, cluster $CLUSTER_TGT"
|
|
|
- withEnv(["service_name=${item}","clustername=${CLUSTER_TGT}","imagetag=${NEWTAG}"]) {
|
|
|
- sh '''export DOCKER_CERT_PATH=/run/secrets/swarm
|
|
|
- export DOCKER_HOST=tcp://${clustername}:2376 DOCKER_TLS_VERIFY=1
|
|
|
- docker service update ${service_name} --image ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${imagetag}
|
|
|
- '''
|
|
|
- }
|
|
|
+ sh """export DOCKER_CERT_PATH=/run/secrets/swarm
|
|
|
+ export DOCKER_HOST=tcp://${CLUSTER_TGT}:2376 DOCKER_TLS_VERIFY=1
|
|
|
+ docker service update ${item} --image ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${NEWTAG}
|
|
|
+ """
|
|
|
}
|
|
|
catch(err){
|
|
|
echo "Recovering service $item"
|