|
|
@ -1,48 +1,11 @@
|
|
|
|
pipeline {
|
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
agent {
|
|
|
|
kubernetes {
|
|
|
|
label 'dind-agent'
|
|
|
|
yaml """\
|
|
|
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
|
|
|
kind: Pod
|
|
|
|
|
|
|
|
metadata:
|
|
|
|
|
|
|
|
name: 'jenkins-slave'
|
|
|
|
|
|
|
|
namespace: 'default'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spec:
|
|
|
|
|
|
|
|
containers:
|
|
|
|
|
|
|
|
- name: dind
|
|
|
|
|
|
|
|
image: "swr.eu-de.otc.t-systems.com/base-image/jenkins-dind"
|
|
|
|
|
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
|
|
|
|
tty: true
|
|
|
|
|
|
|
|
command:
|
|
|
|
|
|
|
|
- "cat"
|
|
|
|
|
|
|
|
volumeMounts:
|
|
|
|
|
|
|
|
- mountPath: "/home/jenkins/agent"
|
|
|
|
|
|
|
|
name: "workspace-volume"
|
|
|
|
|
|
|
|
readOnly: false
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
|
|
|
- name: PASS
|
|
|
|
|
|
|
|
valueFrom:
|
|
|
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
|
|
|
name: docker-reg
|
|
|
|
|
|
|
|
key: pass
|
|
|
|
|
|
|
|
securityContext:
|
|
|
|
|
|
|
|
privileged: true
|
|
|
|
|
|
|
|
imagePullSecrets:
|
|
|
|
|
|
|
|
- name: default-secret
|
|
|
|
|
|
|
|
serviceAccountName: "jenkins-admin"
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
|
|
|
- emptyDir:
|
|
|
|
|
|
|
|
medium: ""
|
|
|
|
|
|
|
|
name: "workspace-volume"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
""".stripIndent()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stages {
|
|
|
|
stage('Build Docker Image') {
|
|
|
|
stage("build image") {
|
|
|
|
steps {
|
|
|
|
steps {
|
|
|
|
container('dind') {
|
|
|
|
|
|
|
|
script {
|
|
|
|
script {
|
|
|
|
def image = "swr.eu-de.otc.t-systems.com/omnia-test/test-build:${env.BUILD_NUMBER}"
|
|
|
|
def image = "swr.eu-de.otc.t-systems.com/omnia-test/test-build:${env.BUILD_NUMBER}"
|
|
|
|
echo "FOO is ${env.BUILD_NUMBER}"
|
|
|
|
echo "FOO is ${env.BUILD_NUMBER}"
|
|
|
@ -58,4 +21,3 @@ pipeline {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|