Jenkinsfile aktualisiert

This commit is contained in:
dresi 2025-11-05 16:36:06 +01:00
parent 9f994cc5ca
commit 7441aca937

44
Jenkinsfile vendored
View File

@ -1,50 +1,18 @@
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
}
label 'docker'
}
stages {
stage('Build Docker image') {
steps {
container('buildah') {
sh 'buildah build --format=docker -f Dockerfile -t onbuild-image .'
}
}
sh 'docker version'
}
}
stage('Tag Docker image') {
steps {
container('kaniko') {
sh 'docker images'
sh 'ls -la'
}
}
sh 'ls -la'
}
}
}
}
}