Update Jenkinsfile
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -20,19 +20,19 @@ pipeline {
|
|||||||
|
|
||||||
stage('Build Image') {
|
stage('Build Image') {
|
||||||
steps {
|
steps {
|
||||||
// We use Kaniko to build the image safely inside Kubernetes
|
// Use ${WORKSPACE} instead of . to avoid the malformed name error
|
||||||
sh '''
|
sh '''
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v .:/workspace \
|
-v ${WORKSPACE}:/workspace \
|
||||||
-v /home/jenkins/.docker/config.json:/kaniko/.docker/config.json \
|
|
||||||
gcr.io/kaniko-project/executor:latest \
|
gcr.io/kaniko-project/executor:latest \
|
||||||
--dockerfile /workspace/Dockerfile \
|
--dockerfile /workspace/Dockerfile \
|
||||||
--context /workspace \
|
--context /workspace \
|
||||||
--destination harbor.myriadcara.com/library/nodejs-app:1 \
|
--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') {
|
stage('Push to Harbor') {
|
||||||
steps {
|
steps {
|
||||||
|
|||||||
Reference in New Issue
Block a user