pipeline { agent { kubernetes { inheritFrom 'dind-agent' cloud 'kubernetes' } } stages { stage("build image") { steps { script { def image = "swr.eu-de.otc.t-systems.com/omnia-test/test-build:${env.BUILD_NUMBER}" sh """ #sleep 2400 image="swr.eu-de.otc.t-systems.com/omnia-test/test-build:latest" docker login \$PASS swr.eu-de.otc.t-systems.com docker build -t ${image} . docker push ${image} """ } milestone(1) } } stage ("deploy") { steps { script { container('kubectl') { sh """ kubectl set image deployment/test-jenkins-deployment test-jenkins=swr.eu-de.otc.t-systems.com/omnia-test/test-build:${env.BUILD_NUMBER} """ } } milestone(2) } } } }