-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile.fapreview.runcluster
More file actions
executable file
·157 lines (146 loc) · 3.98 KB
/
Copy pathJenkinsfile.fapreview.runcluster
File metadata and controls
executable file
·157 lines (146 loc) · 3.98 KB
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
pipeline {
agent none
options {
disableConcurrentBuilds()
buildDiscarder(
logRotator(
numToKeepStr: '10'
)
)
office365ConnectorWebhooks([[
url: "${env.TEAMS_WEBHOOK_URL}",
notifyUnstable: true,
notifyFailure: true,
notifyBackToNormal: true,
startNotification: false,
notifySuccess: false,
notifyAborted: false,
notifyNotBuilt: false,
notifyRepeatedFailure: false
]])
timeout(time: 3, unit: 'HOURS')
}
parameters {
string(
name: 'K6_TEST_NAME',
description: 'The k6 test name',
defaultValue: 'sc1-fap-review-submission-test',
trim: true
)
string(
name: 'TEST_SETUP_VERSION_TAG',
description: 'The test setup image version',
defaultValue: '0.0.5',
trim: true
)
string(
name: 'K6_SETUP_TOTAL_USERS',
description: 'The total number of users to use for the test',
defaultValue: '100',
trim: true
)
string(
name: 'K6_TEST_PARALLELISM',
description: 'The number of parallel pods to use',
defaultValue: '1',
trim: true
)
string(
name: 'FIRST_USER_ID',
description: 'User id of first user',
defaultValue: '-220800000',
trim: true
)
string(
name: 'SETUP_TEST_USERS',
description: 'Flag to set up test users',
defaultValue: 'true',
trim: true
)
string(
name: 'K6_FAP_VUS',
description: 'Number of k6 vus for fap load test',
defaultValue: '100',
trim: true
)
string(
name: 'K6_FAP_ITERATIONS',
description: 'Number of iterations for fap load test',
defaultValue: '1',
trim: true
)
string(
name: 'FAP_PROCESS_LOAD_TEST',
description: 'Flag to indicate fap load test',
defaultValue: 'true',
trim: true
)
choice(
name: 'FAP_MEMBER_ROLE',
choices:['fapMember', 'fapChair', 'fapSecretary'],
description: 'Flag to set up test reviewers role'
)
string(
name: 'FAP_CALL_ID',
description: 'Flag to refer to FAP call ID',
defaultValue: '145',
trim: true
)
string(
name: 'FAP_INSTRUMENT_ID',
description: 'Flag to refer to FAP instrument ID',
defaultValue: '37',
trim: true
)
string(
name: 'FAP_PROPOSALS',
description: 'Flag to set up number of proposals for review',
defaultValue: '300',
trim: true
)
}
environment {
HOME = '.'
}
stages {
stage('Build and run fapreview load tests') {
agent {
dockerfile {
filename 'Dockerfile.run'
label 'linux && docker'
reuseNode true
}
}
environment {
KUBECONFIG = credentials('load-test-kubeconfig')
}
steps {
sh """
# clean up past data
rm -rf ./node_modules
npm ci
npm run-script build:k6-test
"""
sh './run-cluster.sh K6_TEST_NAME=$K6_TEST_NAME SETUP_TEST_USERS=$SETUP_TEST_USERS TEST_SETUP_VERSION_TAG=$TEST_SETUP_VERSION_TAG K6_SETUP_TOTAL_USERS=$K6_SETUP_TOTAL_USERS K6_TEST_PARALLELISM=$K6_TEST_PARALLELISM FIRST_USER_ID=$FIRST_USER_ID K6_FAP_VUS=$K6_FAP_VUS K6_FAP_ITERATIONS=$K6_FAP_ITERATIONS FAP_PROCESS_LOAD_TEST=$FAP_PROCESS_LOAD_TEST FAP_MEMBER_ROLE=$FAP_MEMBER_ROLE FAP_CALL_ID=$FAP_CALL_ID FAP_INSTRUMENT_ID=$FAP_INSTRUMENT_ID FAP_PROPOSALS=$FAP_PROPOSALS'
}
}
}
post {
regression {
emailext(
subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
to: '$DEFAULT_RECIPIENTS',
recipientProviders: [developers()]
)
}
fixed {
emailext(
subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
to: '$DEFAULT_RECIPIENTS',
recipientProviders: [developers()]
)
}
}
}