|
@@ -62,7 +62,7 @@ pipeline {
|
|
|
'''
|
|
|
}
|
|
|
}
|
|
|
-/* stage("Build") {
|
|
|
+ stage("Build") {
|
|
|
steps {
|
|
|
echo "Building ${DOCKER_IMAGE}:${SERIAL}."
|
|
|
sh """docker build --no-cache -t ${DOCKER_IMAGE}:${SERIAL} .
|
|
@@ -82,17 +82,17 @@ pipeline {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-*/ stage("Run in Prod-like") {
|
|
|
+ stage("Run in Prod-like") {
|
|
|
steps {
|
|
|
script {
|
|
|
echo "Check Prod-like cluster status"
|
|
|
- sh "echo -n \${SERIAL} > \${SWARM_GIT_NAME}/tags/\${DOCKER_IMAGE}.version"
|
|
|
+ sh "echo -n \${SERIAL} > \${SWARM_GIT_NAME}/tags/\${DOCKER_IMAGE}.version"
|
|
|
sh """cd \${SWARM_GIT_NAME}/\${DOCKER_IMAGE}
|
|
|
DOCKER_HOST=tcp://${CLUSTERS.get((ENAMES[1]))}:2376 DOCKER_TLS_VERIFY=1 ./ovpn-rsa-open-staging.sh
|
|
|
"""
|
|
|
def NODE = sh script: "DOCKER_HOST=tcp://${CLUSTERS.get((ENAMES[1]))}:2376 DOCKER_TLS_VERIFY=1 docker service ps \${SERVICE_NAME} --format '{{.Node}}' --filter desired-state=Running" , returnStdout: true
|
|
|
echo "${NODE}"
|
|
|
-
|
|
|
+ sh "container_id_client=\$(docker run -d --rm -e "mode=client" -e "server=\${NODE}" --privileged ${DOCKER_IMAGE}:${SERIAL})"
|
|
|
|
|
|
}
|
|
|
}
|