|
@@ -70,7 +70,9 @@ pipeline {
|
|
|
script {
|
|
|
ENAMES.each { item ->
|
|
|
echo "Viewing: ${item} services, on ${CLUSTERS.get((item))}"
|
|
|
- LIST_SERVICE[item] = sh (script: "set +x && DOCKER_HOST=${DHOST.get((item))} DOCKER_TLS_VERIFY=1 docker service ls -f label=com.docker.stack.namespace=$STACK_LABEL -f label=ru.infoclinica.service=$SERVICE_LABEL --format '{{.Name}}'" , returnStdout: true).split('\n')
|
|
|
+ LIST_SERVICE[item] = sh (script: "set +x && DOCKER_HOST=${DHOST.get((item))} DOCKER_TLS_VERIFY=1 docker service ls -f \
|
|
|
+ label=com.docker.stack.namespace=$STACK_LABEL -f \
|
|
|
+ label=ru.infoclinica.service=$SERVICE_LABEL --format '{{.Name}}'" , returnStdout: true).split('\n')
|
|
|
switch (TASK_ACTION) {
|
|
|
case 'up':
|
|
|
echo "These services will be updated to version $VERSION_TO_UPDATE: ${LIST_SERVICE.get(item)}"
|
|
@@ -92,7 +94,8 @@ pipeline {
|
|
|
for (name in LIST_SERVICE.get(item)) {
|
|
|
TO_ROLLBACK[item].add(name)
|
|
|
echo "Update service $name"
|
|
|
- sh "set +x && DOCKER_HOST=${DHOST.get((item))} DOCKER_TLS_VERIFY=1 docker service update $name --image ${REGISTRIES.get((item))}/lab/$DOCKER_IMAGE:$VERSION_TO_UPDATE"
|
|
|
+ sh "set +x && DOCKER_HOST=${DHOST.get((item))} DOCKER_TLS_VERIFY=1 docker service update \
|
|
|
+ $name --image ${REGISTRIES.get((item))}/lab/$DOCKER_IMAGE:$VERSION_TO_UPDATE"
|
|
|
}
|
|
|
}
|
|
|
catch (err) {
|