-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
42 lines (37 loc) · 1.1 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
pipeline {
agent { label 'master' }
stages {
stage('Update submodules') {
steps {
sh 'git submodule init'
sh 'git submodule update'
}
}
stage('Build and package backend') {
steps {
sh 'docker build -t cahbackend -f backend/Dockerfile .'
sh 'docker tag cahbackend localhost:5000/cahbackend'
sh 'docker push localhost:5000/cahbackend'
}
}
stage('Package') {
steps {
sh '/var/lib/jenkins/go/bin/helmVersioner charts/cahbackend/Chart.yaml'
sh 'helm install cahbackend charts/cahbackend || true'
sh 'helm upgrade cahbackend charts/cahbackend'
}
}
stage('Build Frontend') {
steps {
sh 'sh jenkinsBuild.sh'
}
}
stage('Deploy') {
steps {
sh 'rm -r /home/static/cah/* || true'
sh 'cp -r cahfrontend/dist/* /home/static/cah/'
sh 'sudo /home/scripts/restart_nginx'
}
}
}
}