diff --git a/examples/kaniko-declarative.groovy b/examples/kaniko-declarative.groovy index 6da52b16f0..7c1ce809a7 100644 --- a/examples/kaniko-declarative.groovy +++ b/examples/kaniko-declarative.groovy @@ -49,10 +49,8 @@ spec: } steps { git 'https://github.com/jenkinsci/docker-jnlp-slave.git' - container(name: 'kaniko', shell: '/busybox/sh') { - sh '''#!/busybox/sh - /kaniko/executor -f `pwd`/Dockerfile -c `pwd` --insecure --skip-tls-verify --cache=true --destination=mydockerregistry:5000/myorg/myimage - ''' + container('kaniko') { + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --insecure --skip-tls-verify --cache=true --destination=mydockerregistry:5000/myorg/myimage' } } } diff --git a/examples/kaniko-gcr.groovy b/examples/kaniko-gcr.groovy index 5a6abdc3b7..e7bb669e30 100644 --- a/examples/kaniko-gcr.groovy +++ b/examples/kaniko-gcr.groovy @@ -36,11 +36,9 @@ spec: node(POD_LABEL) { stage('Build with Kaniko') { git 'https://github.com/jenkinsci/docker-jnlp-slave.git' - container(name: 'kaniko', shell: '/busybox/sh') { + container('kaniko') { withEnv(['PATH+EXTRA=/busybox:/kaniko']) { - sh '''#!/busybox/sh - /kaniko/executor -c `pwd` --cache=true --destination=gcr.io/myprojectid/myimage - ''' + sh '/kaniko/executor -c `pwd` --cache=true --destination=gcr.io/myprojectid/myimage' } } } diff --git a/examples/kaniko.groovy b/examples/kaniko.groovy index 5992719614..2a6a9e1c43 100644 --- a/examples/kaniko.groovy +++ b/examples/kaniko.groovy @@ -38,11 +38,9 @@ spec: node(POD_LABEL) { stage('Build with Kaniko') { git 'https://github.com/jenkinsci/docker-jnlp-slave.git' - container(name: 'kaniko', shell: '/busybox/sh') { + container(name: 'kaniko') { withEnv(['PATH+EXTRA=/busybox:/kaniko']) { - sh '''#!/busybox/sh - /kaniko/executor -f `pwd`/Dockerfile -c `pwd` --insecure --skip-tls-verify --cache=true --destination=mydockerregistry:5000/myorg/myimage - ''' + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --insecure --skip-tls-verify --cache=true --destination=mydockerregistry:5000/myorg/myimage' } } }