-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
51 lines (44 loc) · 1.45 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
43
44
45
46
47
48
49
50
51
pipeline {
agent { label 'master' }
triggers { cron('0 0 * * 0') }
stages {
stage('Update submodules') {
steps {
sh 'git submodule init'
sh 'git submodule update'
}
}
stage('Build Frontend') {
steps {
sh 'cd frontend && docker build -t mse-frontend .'
sh 'cd frontend && docker tag mse-frontend localhost:5000/mse-frontend'
}
}
stage('Build Backend') {
steps {
sh 'cd backend && docker build -t mse-backend .'
sh 'cd backend && docker tag mse-backend localhost:5000/mse-backend'
}
}
stage('Push images') {
steps {
sh 'docker push localhost:5000/mse-frontend'
sh 'docker push localhost:5000/mse-backend'
}
}
stage('Package Frontend') {
steps {
sh '/var/lib/jenkins/go/bin/helmVersioner charts/mse-frontend/Chart.yaml'
sh 'helm install mse-frontend charts/mse-frontend || true'
sh 'helm upgrade mse-frontend charts/mse-frontend'
}
}
stage('Package Backend') {
steps {
sh '/var/lib/jenkins/go/bin/helmVersioner charts/mse-backend/Chart.yaml'
sh 'helm install mse-backend charts/mse-backend || true'
sh 'helm upgrade mse-backend charts/mse-backend'
}
}
}
}