|
@@ -80,11 +80,11 @@ pipeline {
|
|
|
for (String item : service_update.split()) {
|
|
|
try{
|
|
|
echo "Updating ${item}"
|
|
|
- sh "DOCKER_HOST=$DOCKER_HOST DOCKER_CERT_PATH=$DOCKER_CERT_PATH docker service update ${service_name} --image ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${NEWTAG}"
|
|
|
+ sh "DOCKER_HOST=$DOCKER_HOST DOCKER_CERT_PATH=$DOCKER_CERT_PATH docker service update ${item} --image ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${NEWTAG}"
|
|
|
}
|
|
|
catch(err){
|
|
|
echo "Recovering service $item"
|
|
|
- sh "DOCKER_HOST=$DOCKER_HOST DOCKER_CERT_PATH=$DOCKER_CERT_PATH docker service rollback ${service_name}"
|
|
|
+ sh "DOCKER_HOST=$DOCKER_HOST DOCKER_CERT_PATH=$DOCKER_CERT_PATH docker service rollback ${item}"
|
|
|
throw err
|
|
|
}
|
|
|
}
|