-
Notifications
You must be signed in to change notification settings - Fork 12
/
jenkinsfile
30 lines (23 loc) · 1.04 KB
/
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
node {
def app
stage('Clone repository') {
/* Let's make sure we have the repository cloned to our workspace */
sh 'git clone https://github.com/SaifRehman/facial-recognition.git'
}
stage('building and pushing to docker registery ') {
/* This builds the actual image; synonymous to
* docker build on the command line */
echo 'Waiting 5 minutes for deployment to complete prior starting smoke testing'
sleep 2 // seconds
}
stage('setting kubeconfig ') {
/* This builds the actual image; synonymous to
* docker build on the command line */
sh 'export KUBECONFIG=/bin/kube-config-mel01-mycluster.yml'
}
stage('redeploy the deployment to kubernetes ') {
/* This builds the actual image; synonymous to
* docker build on the command line */
sh 'cd facial-recognition && export KUBECONFIG=/bin/kube-config-mel01-mycluster.yml && kubectl delete deployments angular && kubectl apply -f service-deployment.yml '
}
}