This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
107 lines (93 loc) · 2.5 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
#!/usr/bin/env groovy
pipeline {
agent { label 'executor-v2' }
options {
timestamps()
buildDiscarder(logRotator(numToKeepStr: '30'))
lock resource: "tas-infra"
}
triggers {
cron(getDailyCronString())
}
stages {
stage('Grant IP Access') {
steps {
// Grant access to this Jenkins agent's IP to AWS security groups
grantIPAccess()
}
}
stage('Build') {
steps { sh './dev/build' }
}
stage('Vulnerability Scans') {
parallel {
stage('Fixable Docker Image Issues') {
steps { scanAndReport("conjur-service-broker", "HIGH", false) }
}
stage('All Docker Image Issues') {
steps { scanAndReport("conjur-service-broker", "NONE", true) }
}
}
}
stage('Unit and Integration Testing') {
parallel {
stage('Changelog') {
steps { parseChangelog() }
}
stage('Unit Tests') {
steps {
sh './dev/test_unit'
}
}
stage('Integration Tests') {
steps {
sh './dev/test_integration'
junit 'features/reports/**/*.xml, spec/reports/*.xml'
}
post {
success {
script {
if (env.BRANCH_NAME == 'main') {
archiveArtifacts artifacts: '*.zip', fingerprint: true
}
}
}
}
}
}
}
// The End-to-End test needs to be run separately from the integration
// tests because both use the default docker compose network, and
// both cause this network to be deleted when they clean up with
// 'docker compose down ...'.
// Note: Temporarily disabled due to issues with the ISV CI integration.
// These tests must be run manually until the issues are resolved.
// stage('End-to-End Testing') {
// steps {
// allocateTas('isv_ci_tas_srt_5_0')
// sh 'cd dev && summon ./test_e2e'
// junit 'features/reports/**/*.xml, spec/reports/*.xml'
// }
// post {
// always {
// destroyTas()
// }
// success {
// script {
// if (env.BRANCH_NAME == 'main') {
// archiveArtifacts artifacts: '*.zip', fingerprint: true
// }
// }
// }
// }
// }
stage('Push Docker Image') {
steps { sh './dev/push-image' }
}
}
post {
always {
cleanupAndNotify(currentBuild.currentResult)
}
}
}