Added multi-stage build ot jenkins

This commit is contained in:
Jonathan Ervine 2020-12-14 11:37:50 +08:00
parent cd524ed3ef
commit 75ae08c9ef

9
Jenkinsfile vendored
View File

@ -33,5 +33,14 @@ spec:
stage('Notify gchat') {
hangoutsNotify message: "Alpine Linux 3.12.1 with BBC iPlayer has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false
}
stage('Build multi-stage with Kaniko') {
git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-get_iplayer.git', credentialsId: 'jenkins-to-git'
container('kaniko') {
sh '/kaniko/executor -f `pwd`/Dockerfile.multi -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/get_iplayer:3.26-1'
}
}
stage('Notify gchatof multi-stage build') {
hangoutsNotify message: "Alpine Linux 3.12.1 with BBC iPlayer 3.26-1 (multi-stage docker build) has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false
}
}
}