diff --git a/Jenkinsfile b/Jenkinsfile index bc94989..4b94ccf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,19 +20,19 @@ pipeline { stage('Build Image') { steps { - // We use Kaniko to build the image safely inside Kubernetes + // Use ${WORKSPACE} instead of . to avoid the malformed name error sh ''' docker run --rm \ - -v .:/workspace \ - -v /home/jenkins/.docker/config.json:/kaniko/.docker/config.json \ + -v ${WORKSPACE}:/workspace \ gcr.io/kaniko-project/executor:latest \ --dockerfile /workspace/Dockerfile \ --context /workspace \ --destination harbor.myriadcara.com/library/nodejs-app:1 \ - --destination harbor.myriadcara.com/library/nodejs-app:latest + --destination harbor.myriadcara.com/library/nodejs-app:latest \ + --insecure --skip-tls-verify ''' - } } +} stage('Push to Harbor') { steps {