This commit is contained in:
Vendored
+16
-1
@@ -13,17 +13,32 @@ pipeline {
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
command: ["/busybox/cat"]
|
||||
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
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Run kaniko') {
|
||||
environment {
|
||||
PATH = "/busybox:$PATH"
|
||||
}
|
||||
steps {
|
||||
container(name: 'kaniko', shell: '/busybox/sh') {
|
||||
ansiColor('xterm') {
|
||||
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