39 lines
969 B
Groovy
39 lines
969 B
Groovy
pipeline {
|
|
agent {
|
|
kubernetes {
|
|
yaml '''
|
|
apiVersion: "v1"
|
|
kind: "Pod"
|
|
metadata:
|
|
spec:
|
|
containers:
|
|
- command:
|
|
- "cat"
|
|
image: "docker:dind"
|
|
name: "dind"
|
|
tty: true
|
|
volumeMounts:
|
|
- mountPath: "/home/jenkins/agent"
|
|
name: "workspace-volume"
|
|
readOnly: false
|
|
'''
|
|
retries 2
|
|
}
|
|
}
|
|
stages {
|
|
stage('Build Docker image') {
|
|
steps {
|
|
container('dind') {
|
|
sh 'cat run.sh'
|
|
sh 'docker build -t "andreas/rsyncd:${env.BUILD_TAG}"'
|
|
sh 'docker images'
|
|
}
|
|
}
|
|
}
|
|
stage('Tag Docker image') {
|
|
steps {
|
|
sh 'ls -la'
|
|
}
|
|
}
|
|
}
|
|
} |