forked from sudswas/sampleflaskapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
25 lines (20 loc) · 769 Bytes
/
Jenkinsfile
File metadata and controls
25 lines (20 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
node {
dir("/root/"){
checkout scm
env.DOCKER_API_VERSION="1.23"
appName = "blockchain/flask-app"
registryHost = "finance.icp.sc.ibm.com:8500/"
imageName = "${registryHost}${appName}:${env.BUILD_ID}"
env.BUILDIMG=imageName
docker.withRegistry('https://finance.icp.sc.ibm.com:8500/', 'docker'){
stage "Build"
def pcImg = docker.build("finance.icp.sc.ibm.com:8500/blockchain/flask-app:${env.BUILD_ID}", "-f Dockerfile .")
// sh "cp /root/.dockercfg ${HOME}/.dockercfg"
pcImg.push()
input 'Do you want to proceed with Deployment?'
stage "Deploy"
sh "kubectl set image deployment/demoapp-demochart demochart=${imageName}"
sh "kubectl rollout status deployment/demoapp-demochart"
}
}
}