forked from Devendra61/bentoml_ccfd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
29 lines (23 loc) · 1003 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
node {
stage("Git Clone"){
git credentialsId: 'Git-Hub-Credentials', url: "https://github.com/vipulwarthe/bentoml_ccfd-1.git"
stage("Docker build"){
sh 'docker version'
sh 'pip install -r requirements.txt'
sh 'python3 train.py'
sh 'bentoml build .'
sh 'bentoml containerize xgb_classifier:latest -t vipulwarthe/xgb_classifier:latest'
}
stage("Docker Login"){
withCredentials([string(credentialsId: 'vipulwarthe', variable: 'PASSWORD')]) {
sh "docker login -u vipulwarthe -p ${PASSWORD}"
}
}
stage("Push image to docker hub"){
sh 'docker push vipulwarthe/xgb_classifier:latest'
}
stage("Kubernetes deployment"){
kubernetesDeploy (configs: 'deploymentservice.yaml', kubeconfigId: 'kuberneteskey')
}
}
}