1- pipeline {
2-
3- agent none
4-
5- options {
6- disableConcurrentBuilds()
7-
8- buildDiscarder(
9- logRotator(
10- numToKeepStr: '10'
11- )
12- )
13-
14- office365ConnectorWebhooks([[
15- url: "${env.TEAMS_WEBHOOK_URL}",
16- notifyUnstable: true,
17- notifyFailure: true,
18- notifyBackToNormal: true,
19- startNotification: false,
20- notifySuccess: false,
21- notifyAborted: false,
22- notifyNotBuilt: false,
23- notifyRepeatedFailure: false
24- ]])
25-
26- timeout(time: 3, unit: 'HOURS')
27- }
28- parameters {
29- string(
30- name: 'K6_TEST_NAME',
31- description: 'The k6 test name',
32- trim: true
33- )
34- string(
35- name: 'TEST_SETUP_VERSION_TAG',
36- description: 'The test setup image version',
37- defaultValue: '0.0.5',
38- trim: true
39- )
40- string(
41- name: 'K6_PS_VUS',
42- description: 'The number of k6 vus',
43- defaultValue: '50',
44- trim: true
45- )
46- string(
47- name: 'K6_PS_ITERATIONS',
48- description: 'The number of k6 iterations',
49- defaultValue: '2',
50- trim: true
51- )
52- string(
53- name: 'K6_SETUP_TOTAL_USERS',
54- description: 'The total number of users to use for the test',
55- defaultValue: '250',
56- trim: true
57- )
58- string(
59- name: 'TEST_SETUP_CALL_ID',
60- description: 'The call id in develop',
61- defaultValue: '306',
62- trim: true
63- )
64- string(
65- name: 'K6_TEST_PARALLELISM',
66- description: 'The number of parallel pods to use',
67- defaultValue: '2',
68- trim: true
69- )
70- string(
71- name: 'FIRST_USER_ID',
72- description: 'User id of first user',
73- defaultValue: '-220806000',
74- trim: true
75- )
76- string(
77- name: 'SETUP_TEST_USERS',
78- description: 'Flag to set up test users',
79- defaultValue: 'true',
80- trim: true
81- )
82- string(
83- name: 'SETUP_TEST_CALL',
84- description: 'Flag to set up test call',
85- defaultValue: 'true',
86- trim: true
87- )
88- string(
89- name: 'K6_FAP_VUS',
90- description: 'Number of k6 vus for fap load test',
91- defaultValue: '100',
92- trim: true
93- )
94- string(
95- name: 'K6_FAP_ITERATIONS',
96- description: 'Number of iterations for fap load test',
97- defaultValue: '1',
98- trim: true
99- )
100- string(
101- name: 'FAP_PROCESS_LOAD_TEST',
102- description: 'Flag to indicate fap load test',
103- defaultValue: 'false',
104- trim: true
105- )
106- choice(
107- name: 'FAP_MEMBER_ROLE',
108- choices:['fapMember', 'fapChair', 'fapSecretary'],
109- description: 'Flag to set up test reviewers role'
110- )
111- string(
112- name: 'FAP_CALL_ID',
113- description: 'Flag to refer to FAP call ID',
114- defaultValue: '145',
115- trim: true
116- )
117- string(
118- name: 'FAP_INSTRUMENT_ID',
119- description: 'Flag to refer to FAP instrument ID',
120- defaultValue: '37',
121- trim: true
122- )
123- string(
124- name: 'FAP_PROPOSALS',
125- description: 'Flag to set up number of proposals for review',
126- defaultValue: '300',
127- trim: true
128- )
129-
130- }
131- environment {
132- HOME = '.'
133- }
134- stages {
135- stage('Build and run load tests') {
136-
137- agent {
138- dockerfile {
139- filename 'Dockerfile.run'
140- label 'linux && docker'
141- reuseNode true
142- }
143- }
144- environment {
145- KUBECONFIG = credentials('load-test-kubeconfig')
146- }
147- steps {
148- sh """
149- # clean up past data
150- rm -rf ./node_modules
151- npm ci
152- npm run-script build:k6-test
153- """
154- sh './run-cluster.sh K6_TEST_NAME=$K6_TEST_NAME SETUP_TEST_CALL=$SETUP_TEST_CALL SETUP_TEST_USERS=$SETUP_TEST_USERS TEST_SETUP_VERSION_TAG=$TEST_SETUP_VERSION_TAG K6_PS_VUS=$K6_PS_VUS K6_PS_ITERATIONS=$K6_PS_ITERATIONS K6_SETUP_TOTAL_USERS=$K6_SETUP_TOTAL_USERS K6_TEST_PARALLELISM=$K6_TEST_PARALLELISM TEST_SETUP_CALL_ID=$TEST_SETUP_CALL_ID 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'
155- }
156- }
157-
158- }
159-
160- post {
161- regression {
162- emailext(
163- subject: '$DEFAULT_SUBJECT',
164- body: '$DEFAULT_CONTENT',
165- to: '$DEFAULT_RECIPIENTS',
166- recipientProviders: [developers()]
167- )
168- }
169-
170- fixed {
171- emailext(
172- subject: '$DEFAULT_SUBJECT',
173- body: '$DEFAULT_CONTENT',
174- to: '$DEFAULT_RECIPIENTS',
175- recipientProviders: [developers()]
176- )
177- }
178- }
179- }
1+ pipeline {
2+
3+ agent none
4+
5+ options {
6+ disableConcurrentBuilds()
7+
8+ buildDiscarder(
9+ logRotator(
10+ numToKeepStr: '10'
11+ )
12+ )
13+
14+ office365ConnectorWebhooks([[
15+ url: "${env.TEAMS_WEBHOOK_URL}",
16+ notifyUnstable: true,
17+ notifyFailure: true,
18+ notifyBackToNormal: true,
19+ startNotification: false,
20+ notifySuccess: false,
21+ notifyAborted: false,
22+ notifyNotBuilt: false,
23+ notifyRepeatedFailure: false
24+ ]])
25+
26+ timeout(time: 3, unit: 'HOURS')
27+ }
28+ parameters {
29+ string(
30+ name: 'K6_TEST_NAME',
31+ description: 'The k6 test name',
32+ trim: true
33+ )
34+ string(
35+ name: 'TEST_SETUP_VERSION_TAG',
36+ description: 'The test setup image version',
37+ defaultValue: '0.0.5',
38+ trim: true
39+ )
40+ string(
41+ name: 'K6_PS_VUS',
42+ description: 'The number of k6 vus',
43+ defaultValue: '50',
44+ trim: true
45+ )
46+ string(
47+ name: 'K6_PS_ITERATIONS',
48+ description: 'The number of k6 iterations',
49+ defaultValue: '2',
50+ trim: true
51+ )
52+ string(
53+ name: 'K6_SETUP_TOTAL_USERS',
54+ description: 'The total number of users to use for the test',
55+ defaultValue: '250',
56+ trim: true
57+ )
58+ string(
59+ name: 'TEST_SETUP_CALL_ID',
60+ description: 'The call id in develop',
61+ defaultValue: '311',
62+ trim: true
63+ )
64+ string(
65+ name: 'K6_TEST_PARALLELISM',
66+ description: 'The number of parallel pods to use',
67+ defaultValue: '2',
68+ trim: true
69+ )
70+ string(
71+ name: 'FIRST_USER_ID',
72+ description: 'User id of first user',
73+ defaultValue: '-220806000',
74+ trim: true
75+ )
76+ booleanParam(
77+ name: 'SETUP_TEST_USERS',
78+ description: 'Flag to set up test users',
79+ defaultValue: true
80+ )
81+ booleanParam(
82+ name: 'SETUP_TEST_CALL',
83+ description: 'Flag to set up test call',
84+ defaultValue: true
85+ )
86+ string(
87+ name: 'K6_FAP_VUS',
88+ description: 'Number of k6 vus for fap load test',
89+ defaultValue: '100',
90+ trim: true
91+ )
92+ string(
93+ name: 'K6_FAP_ITERATIONS',
94+ description: 'Number of iterations for fap load test',
95+ defaultValue: '1',
96+ trim: true
97+ )
98+ booleanParam(
99+ name: 'FAP_PROCESS_LOAD_TEST',
100+ description: 'Flag to indicate fap load test',
101+ defaultValue: false
102+ )
103+ choice(
104+ name: 'FAP_MEMBER_ROLE',
105+ choices: ['fapMember', 'fapChair', 'fapSecretary'],
106+ description: 'Flag to set up test reviewers role'
107+ )
108+ string(
109+ name: 'FAP_CALL_ID',
110+ description: 'Flag to refer to FAP call ID',
111+ defaultValue: '145',
112+ trim: true
113+ )
114+ string(
115+ name: 'FAP_INSTRUMENT_ID',
116+ description: 'Flag to refer to FAP instrument ID',
117+ defaultValue: '37',
118+ trim: true
119+ )
120+ string(
121+ name: 'FAP_PROPOSALS',
122+ description: 'Flag to set up number of proposals for review',
123+ defaultValue: '300',
124+ trim: true
125+ )
126+ }
127+ environment {
128+ HOME = '.'
129+ }
130+ stages {
131+ stage('Build and run load tests') {
132+
133+ agent {
134+ dockerfile {
135+ filename 'Dockerfile.run'
136+ label 'linux && docker'
137+ reuseNode true
138+ }
139+ }
140+ environment {
141+ KUBECONFIG = credentials('load-test-kubeconfig')
142+ K6_TEST_NAME = "${params.K6_TEST_NAME}"
143+ TEST_SETUP_VERSION_TAG = "${params.TEST_SETUP_VERSION_TAG}"
144+ K6_PS_VUS = "${params.K6_PS_VUS}"
145+ K6_PS_ITERATIONS = "${params.K6_PS_ITERATIONS}"
146+ K6_SETUP_TOTAL_USERS = "${params.K6_SETUP_TOTAL_USERS}"
147+ TEST_SETUP_CALL_ID = "${params.TEST_SETUP_CALL_ID}"
148+ K6_TEST_PARALLELISM = "${params.K6_TEST_PARALLELISM}"
149+ FIRST_USER_ID = "${params.FIRST_USER_ID}"
150+ SETUP_TEST_USERS = "${params.SETUP_TEST_USERS}"
151+ SETUP_TEST_CALL = "${params.SETUP_TEST_CALL}"
152+ K6_FAP_VUS = "${params.K6_FAP_VUS}"
153+ K6_FAP_ITERATIONS = "${params.K6_FAP_ITERATIONS}"
154+ FAP_PROCESS_LOAD_TEST = "${params.FAP_PROCESS_LOAD_TEST}"
155+ FAP_MEMBER_ROLE = "${params.FAP_MEMBER_ROLE}"
156+ FAP_CALL_ID = "${params.FAP_CALL_ID}"
157+ FAP_INSTRUMENT_ID = "${params.FAP_INSTRUMENT_ID}"
158+ FAP_PROPOSALS = "${params.FAP_PROPOSALS}"
159+ }
160+ steps {
161+ sh """
162+ npm ci
163+ npm run-script build:k6-test
164+ ./run-cluster.sh
165+ """
166+ }
167+ }
168+ }
169+
170+ post {
171+ regression {
172+ emailext(
173+ subject: '$DEFAULT_SUBJECT',
174+ body: '$DEFAULT_CONTENT',
175+ to: '$DEFAULT_RECIPIENTS',
176+ recipientProviders: [developers()]
177+ )
178+ }
179+
180+ fixed {
181+ emailext(
182+ subject: '$DEFAULT_SUBJECT',
183+ body: '$DEFAULT_CONTENT',
184+ to: '$DEFAULT_RECIPIENTS',
185+ recipientProviders: [developers()]
186+ )
187+ }
188+ }
189+ }
0 commit comments