forked from cyberark/secretless-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
110 lines (92 loc) · 2.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
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/usr/bin/env groovy
pipeline {
agent { label 'executor-v2' }
options {
timestamps()
buildDiscarder(logRotator(numToKeepStr: '30'))
}
stages {
stage('Image Build') {
steps {
sh './bin/build'
}
}
stage('Linting') {
steps {
sh './bin/check_style'
checkstyle pattern: 'test/golint.xml', canComputeNew: true, usePreviousBuildAsReference: false, failedNewAll: "0", failedTotalAll: "0", unHealthy: "0", healthy: "1", thresholdLimit: "low", useDeltaValues: false
}
}
stage('Unit tests') {
steps {
sh './bin/test_unit'
junit 'test/junit.xml'
}
}
stage('Integration tests') {
steps {
sh './bin/test_integration'
junit 'test/junit.xml'
}
}
stage('Demo tests') {
steps {
sh './bin/test_quickstart'
}
}
stage('Push Images') {
when {
branch 'master'
}
steps {
sh './bin/publish'
sh './sidecar-injector/bin/publish'
}
}
stage('Fix Website Flags (staging)') {
when {
branch 'staging'
}
steps {
sh 'sed -i "s#^is_maintenance_mode:.*#is_maintenance_mode: false#" docs/_config.yml'
}
}
stage('Build Website') {
steps {
sh './bin/build_website'
}
}
stage('Check Links') {
steps {
sh './bin/check_website_links'
}
}
stage('Publish') {
parallel {
stage('Publish Website (staging)') {
when {
branch 'staging'
}
steps {
sh 'summon -e staging bin/publish_website'
archiveArtifacts 'docs/_site/'
}
}
stage('Publish Website (production)') {
when {
branch 'master'
}
steps {
sh 'summon -e production bin/publish_website'
archiveArtifacts 'docs/_site/'
}
}
}
}
}
post {
always {
cleanupAndNotify(currentBuild.currentResult)
}
}
}