-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
55 lines (49 loc) · 1.07 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
52
53
54
55
pipeline {
agent any
stages {
stage('docker build') {
steps {
sh 'make build'
}
}
stage('docker test') {
steps {
sh 'make test'
}
}
stage('deploy to dev') {
environment {
ENVIRONMENT = 'dev'
}
steps {
sh 'echo "deploy to ${ENVIRONMENT}..."'
sh 'make deploy'
}
}
stage('deploy to stg') {
environment {
ENVIRONMENT = 'stg'
}
steps {
timeout(time: 1, unit: 'HOURS') {
input message: 'deploy to stg?', submitter: 'admin', submitterParameter: 'submitter'
}
sh 'export ENVIRONMENT=stg'
sh 'make deploy'
sh 'echo "deploy to ${ENVIRONMENT}..."'
}
}
stage('deploy to prod') {
environment {
ENVIRONMENT = 'prod'
}
steps {
timeout(time: 1, unit: 'HOURS') {
input message: 'deploy to prod?', submitter: 'admin', submitterParameter: 'submitter'
}
sh 'echo "deploy to ${ENVIRONMENT}..."'
sh 'helm init'
}
}
}
}