Skip to content

Commit b492185

Browse files
committed
ci: allow choice of host for e2e jobs
Nastya wanted to pick hosts to run manual e2e jobs on. This change will give her options to pick from `linux-01`, `linux-02` and `linux-03` for linux and choice between `windows-04`, `windows-05` for windows.
1 parent ea8d5e1 commit b492185

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

ci/Jenkinsfile.tests-e2e

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ library '[email protected]'
44
pipeline {
55
agent {
66
dockerfile {
7-
label 'linuxcontainer'
7+
label getAgentLabel()
88
filename 'tests.Dockerfile'
99
dir 'ci'
1010
args '--network=host ' +
@@ -56,6 +56,16 @@ pipeline {
5656
description: 'Log level for pytest.',
5757
choices: ['INFO', 'DEBUG', 'TRACE', 'WARNING', 'CRITICAL']
5858
)
59+
choice(
60+
name: 'AGENT_NODE',
61+
description: 'Which Linux worker to run on (leave default for random selection)',
62+
choices: [
63+
'',
64+
'linux-01',
65+
'linux-02',
66+
'linux-03'
67+
],
68+
)
5969
}
6070

6171
options {
@@ -301,3 +311,10 @@ def getDefaultTestScopeFlag() {
301311
}
302312

303313
def getTestStageTimeout() { params.TEST_SCOPE_FLAG == '-m=critical' ? 30 : 120 }
314+
315+
def getAgentLabel() {
316+
if (params.AGENT_NODE && params.AGENT_NODE != '') {
317+
return "linuxcontainer && ${params.AGENT_NODE}"
318+
}
319+
return 'linuxcontainer'
320+
}

ci/Jenkinsfile.tests-e2e.windows

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ library '[email protected]'
44
pipeline {
55

66
agent {
7-
label 'windows && x86_64 && qt-6.9.2 && windows-e2e'
7+
label getAgentLabel()
88
}
99

1010
parameters {
@@ -45,6 +45,17 @@ pipeline {
4545
description: 'Log level for pytest.',
4646
choices: ['INFO', 'DEBUG', 'TRACE', 'WARNING', 'CRITICAL']
4747
)
48+
choice(
49+
name: 'AGENT_NODE',
50+
description: 'Which Windows host to run on (leave default for random selection)',
51+
choices: [
52+
'',
53+
'windows-01-vm',
54+
'windows-02-vm',
55+
'windows-03-vm',
56+
'windows-04-vm'
57+
],
58+
)
4859
}
4960

5061
options {
@@ -294,3 +305,11 @@ def getDefaultTestScopeFlag() {
294305
}
295306

296307
def getTestStageTimeout() { params.TEST_SCOPE_FLAG == '-m=critical' ? 30 : 120 }
308+
309+
def getAgentLabel() {
310+
def baseLabel = 'windows && x86_64 && qt-6.9.2 && windows-e2e'
311+
if (params.AGENT_NODE && params.AGENT_NODE != '') {
312+
return "${baseLabel} && ${params.AGENT_NODE}"
313+
}
314+
return baseLabel
315+
}

0 commit comments

Comments
 (0)