|
|
@ -4,13 +4,13 @@ tag="latest"
|
|
|
|
image="swr.eu-de.otc.t-systems.com/omnia-test/${repository}:${version}.${env.BUILD_NUMBER}"
|
|
|
|
image="swr.eu-de.otc.t-systems.com/omnia-test/${repository}:${version}.${env.BUILD_NUMBER}"
|
|
|
|
namespace="demo"
|
|
|
|
namespace="demo"
|
|
|
|
|
|
|
|
|
|
|
|
podTemplate(label: 'pod', cloud: 'kubernetes', serviceAccount: 'jenkins-sa"',
|
|
|
|
podTemplate(label: 'pod', cloud: 'k8s-config', serviceAccount: 'jenkins-sa"',
|
|
|
|
imagePullSecrets: [
|
|
|
|
imagePullSecrets: [
|
|
|
|
'default-secret'
|
|
|
|
'default-secret'
|
|
|
|
],
|
|
|
|
],
|
|
|
|
containers: [
|
|
|
|
containers: [
|
|
|
|
containerTemplate(
|
|
|
|
containerTemplate(
|
|
|
|
name: 'docker', image: 'swr.eu-de.otc.t-systems.com/base-image/docker:dind', ttyEnabled: true, command: 'cat', privileged: true,
|
|
|
|
name: 'docker', image: 'myregistry/base-image/docker:dind', ttyEnabled: true, command: 'cat', privileged: true,
|
|
|
|
envVars: [
|
|
|
|
envVars: [
|
|
|
|
secretEnvVar(key: "PASS", secretName: "docker-reg", secretKey: "docker-reg")
|
|
|
|
secretEnvVar(key: "PASS", secretName: "docker-reg", secretKey: "docker-reg")
|
|
|
|
]
|
|
|
|
]
|
|
|
@ -21,9 +21,7 @@ podTemplate(label: 'pod', cloud: 'kubernetes', serviceAccount: 'jenkins-sa"',
|
|
|
|
stage('Build Docker Image') {
|
|
|
|
stage('Build Docker Image') {
|
|
|
|
container('docker') {
|
|
|
|
container('docker') {
|
|
|
|
sh """
|
|
|
|
sh """
|
|
|
|
docker login ${env.PASS} swr.eu-de.otc.t-systems.com
|
|
|
|
...
|
|
|
|
docker build -t ${image}:${tag} .
|
|
|
|
|
|
|
|
docker push ${image}:${tag}
|
|
|
|
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
milestone(1)
|
|
|
|
milestone(1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|