You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB
Groovy

pipeline {
agent {
kubernetes
{
inheritFrom 'dind-agent'
cloud 'kubernetes'
}
}
stages {
stage("build image") {
steps {
script {
container('jnlp') {
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('kubeind') {
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)
}
}
}
}