This commit is contained in:
Vendored
+16
-1
@@ -13,17 +13,32 @@ pipeline {
|
|||||||
image: gcr.io/kaniko-project/executor:debug
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
command: ["/busybox/cat"]
|
command: ["/busybox/cat"]
|
||||||
tty: true
|
tty: true
|
||||||
|
volumeMounts:
|
||||||
|
- name: jenkins-docker-cfg
|
||||||
|
mountPath: /kaniko/.docker
|
||||||
|
volumes:
|
||||||
|
- name: jenkins-docker-cfg
|
||||||
|
projected:
|
||||||
|
sources:
|
||||||
|
- secret:
|
||||||
|
name: registry-credentials
|
||||||
|
items:
|
||||||
|
- key: .dockerconfigjson
|
||||||
|
path: config.json
|
||||||
'''
|
'''
|
||||||
retries 2
|
retries 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Run kaniko') {
|
stage('Run kaniko') {
|
||||||
|
environment {
|
||||||
|
PATH = "/busybox:$PATH"
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
container(name: 'kaniko', shell: '/busybox/sh') {
|
container(name: 'kaniko', shell: '/busybox/sh') {
|
||||||
ansiColor('xterm') {
|
ansiColor('xterm') {
|
||||||
sh '''#!/busybox/sh
|
sh '''#!/busybox/sh
|
||||||
/kaniko/executor --dockerfile="Dockerfile" --context=`pwd` --no-push
|
/kaniko/executor --dockerfile="Dockerfile" --context=`pwd` --destination=harbor.hnrx.net/homelab/my-jenkins-casc:2.500-test
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user