|
@@ -1,3 +1,4 @@
|
|
|
+def NEWTAG
|
|
|
pipeline {
|
|
|
agent {
|
|
|
label "swarm"
|
|
@@ -38,10 +39,13 @@ pipeline {
|
|
|
steps {
|
|
|
echo "Building ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}."
|
|
|
sh "docker build --build-arg repo=${repo} --no-cache -t ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} ."
|
|
|
+ NEWTAG = sh script: "docker run --rm ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} rpm -q --qf %{VERSION}-%{RELEASE} web-registry-admin 2> /dev/null", returnStdout: true
|
|
|
}
|
|
|
}
|
|
|
stage("Publish") {
|
|
|
steps {
|
|
|
+ echo "Tag is $NEWTAG"
|
|
|
+ error "Stop pipeline"
|
|
|
echo "Publishing ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}"
|
|
|
sh "docker push ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}"
|
|
|
}
|