36 lines
885 B
Groovy
36 lines
885 B
Groovy
podTemplate(yaml: """
|
|
kind: Pod
|
|
spec:
|
|
containers:
|
|
- name: kaniko
|
|
image: gcr.io/kaniko-project/executor:debug-539ddefcae3fd6b411a95982a830d987f4214251
|
|
imagePullPolicy: Always
|
|
command:
|
|
- /busybox/cat
|
|
tty: true
|
|
volumeMounts:
|
|
- name: jenkins-docker-cfg
|
|
mountPath: /kaniko/.docker
|
|
volumes:
|
|
- name: jenkins-docker-cfg
|
|
projected:
|
|
sources:
|
|
- secret:
|
|
name: regcred
|
|
items:
|
|
- key: .dockerconfigjson
|
|
path: config.json
|
|
"""
|
|
) {
|
|
|
|
node(POD_LABEL) {
|
|
stage('Build with Kaniko') {
|
|
git url: 'https://git.ervine.org/jonny/x86_64-suse-step_bootstrap.git', credentialsId: 'jenkins-to-git'
|
|
container('kaniko') {
|
|
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/library/x86_64/suse/stepca_bootstrap:0.14.3'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|