rsyncd-docker/Jenkinsfile
2025-11-05 14:05:45 +01:00

50 lines
1.1 KiB
Groovy

pipeline {
agent {
kubernetes {
yaml '''
apiVersion: v1
kind: Pod
metadata:
name: docker
labels:
name: docker
spec:
containers:
- name: buildah
image: buildah/buildah:latest
securityContext:
privileged: true
volumeMounts:
- mountPath: "/home/jenkins/agent"
name: "workspace-volume"
readOnly: false
- name: dind
image: docker:24.0.0-rc.1-dind
securityContext:
privileged: true
volumeMounts:
- mountPath: "/home/jenkins/agent"
name: "workspace-volume"
readOnly: false
'''
retries 2
}
}
stages {
stage('Build Docker image') {
steps {
container('buildah') {
sh 'buildah build --format=docker -f Dockerfile -t onbuild-image .'
}
}
}
stage('Tag Docker image') {
steps {
container('kaniko') {
sh 'docker images'
sh 'ls -la'
}
}
}
}
}