forked from cloud-bulldozer/scale-ci-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
180 lines (150 loc) · 5.12 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
#!/usr/bin/env groovy
def contact = "[email protected]"
def watcher = SCALE_CI_WATCHER.toString().toUpperCase()
def build_tracker = SCALE_CI_BUILD_TRACKER.toString().toUpperCase()
def tooling = TOOLING.toString().toUpperCase()
def run_conformance = CONFORMANCE.toString().toUpperCase()
def openshiftv4_install_on_aws = OPENSHIFTv4_INSTALL_ON_AWS.toString().toUpperCase()
def openshiftv4_install_on_azure = OPENSHIFTv4_INSTALL_ON_AZURE.toString().toUpperCase()
def ocpv3_scale = OPENSHIFTv3_SCALE.toString().toUpperCase()
def ocpv4_scale = OPENSHIFTv4_SCALE.toString().toUpperCase()
def nodevertical = NODEVERTICAL_SCALE_TEST.toString().toUpperCase()
def mastervertical = MASTERVERTICAL_SCALE_TEST.toString().toUpperCase()
def install_openstack = OPENSTACK_INSTALL.toString().toUpperCase()
def browbeat = BROWBEAT_INSTALL.toString().toUpperCase()
def http = HTTP_TEST.toString().toUpperCase()
def logging = LOGGING_SCALE_TEST.toString().toUpperCase()
def pgbench_test = PGBENCH_TEST.toString().toUpperCase()
def prometheus_test = PROMETHEUS_TEST.toString().toUpperCase()
def mongodb_ycsb_test = MONGODB_YCSB_TEST.toString().toUpperCase()
def services_per_namespace = SERVICES_PER_NAMESPACE.toString().toUpperCase()
def podvertical = PODVERTICAL.toString().toUpperCase()
def deployments_per_ns = DEPLOYMENTS_PER_NS.toString().toUpperCase()
def ns_per_cluster = NS_PER_CLUSTER.toString().toUpperCase()
def networking = NETWORKING.toString().toUpperCase()
def byo = BYO_SCALE_TEST.toString().toUpperCase()
def baseline = BASELINE_SCALE_TEST.toString().toUpperCase()
def run_uperf = UPERF.toString().toUpperCase()
def node_label = NODE_LABEL.toString()
node (node_label) {
// setup the repo containing the pipeline scripts
stage('cloning pipeline repo') {
checkout scm
}
// creates/updates jenkins jobs using the jjb templates
if (watcher == "TRUE") {
load "pipeline-scripts/scale_ci_watcher.groovy"
}
// Queries UMB message to capture the OCP 4.x payloads
if ( build_tracker == "TRUE") {
load "pipeline-scripts/scale_ci_build_tracker.groovy"
}
// stage to install openstack
if (install_openstack == "TRUE") {
load "pipeline-scripts/openstack.groovy"
}
// stage to set up browbeat
if (browbeat == "TRUE") {
load "pipeline-scripts/browbeat.groovy"
}
// stage to install openshift 3.x
if (openshiftv3_install == "TRUE") {
load "pipeline-scripts/openshiftv3.groovy"
}
// stage to install openshift 4.x on AWS
if (openshiftv4_install_on_aws == "TRUE") {
load "pipeline-scripts/openshiftv4_on_aws.groovy"
}
// stage to install openshift 4.x on Azure
if (openshiftv4_install_on_azure == "TRUE") {
load "pipeline-scripts/openshiftv4_on_azure.groovy"
}
// stage to setup pbench
if (tooling == "TRUE") {
load "pipeline-scripts/tooling.groovy"
}
// stage to run conformance
if (run_conformance == "TRUE") {
load "pipeline-scripts/conformance.groovy"
}
// stage to scaleup the cluster
if (ocpv3_scale == "TRUE") {
load "pipeline-scripts/openshiftv3_scale.groovy"
}
// stage to run OCP 4.X scaleup
if (ocpv4_scale == "TRUE") {
load "pipeline-scripts/openshiftv4_scale.groovy"
}
// stage to run nodevertical scale test
if (nodevertical == "TRUE") {
load "pipeline-scripts/nodevertical.groovy"
}
// stage to run http scale test
if (http == "TRUE") {
load "pipeline-scripts/http.groovy"
}
// stage to run services per namespace test
if (services_per_namespace == "TRUE") {
load "pipeline-scripts/services_per_namespace.groovy"
}
// stage to run deployments per ns test
if ( deployments_per_ns == "TRUE" ) {
load "pipeline-scripts/deployments_per_ns.groovy"
}
// stage to run podvertical test
if ( podvertical == "TRUE" ) {
load "pipeline-scripts/podvertical.groovy"
}
// stage to run networking test
if ( networking == "TRUE" ) {
load "pipeline-scripts/networking.groovy"
}
// stage to run pgbench scale test
if ( pgbench_test == "TRUE" ) {
load "pipeline-scripts/pgbench.groovy"
}
// stage to run mongodb ycsb scale test
if ( mongodb_ycsb_test == "TRUE" ) {
load "pipeline-scripts/mongodbycsb.groovy"
}
// stage to run mastervertical scale test
if (mastervertical == "TRUE") {
load "pipeline-scripts/mastervertical.groovy"
}
// stage to run ns_per_cluster test
if ( ns_per_cluster == "TRUE" ) {
load "pipeline-scripts/ns_per_cluster.groovy"
}
// stage to run logging scale test
if (logging == "TRUE") {
load "pipeline-scripts/logging.groovy"
}
// stage to run prometheus scale test
if ( prometheus_test == "TRUE" ) {
load "pipeline-scripts/prometheus.groovy"
}
// stage to run BYO scale test
if (byo == "TRUE") {
load "pipeline-scripts/byo.groovy"
}
// stage to run baseline test
if (baseline == "TRUE" ) {
load "pipeline-scripts/baseline.groovy"
}
// stage to run uperf test
if (run_uperf == "TRUE" ) {
load "pipeline-scripts/uperf.groovy"
}
// cleanup the workspace
stage('cleaning workspace') {
deleteDir()
}
mail(
to: contact,
subject: "${env.JOB_NAME} ${env.BUILD_NUMBER} completed successfully",
body: """\
Jenkins job: ${env.BUILD_URL}\n\n
See the console output for more details: ${env.BUILD_URL}consoleFull\n\n
"""
)
}