This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathJenkinsfileFedoraImageTestTrigger
56 lines (50 loc) · 2.41 KB
/
JenkinsfileFedoraImageTestTrigger
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
#!groovy
def libraries = ['upstream-fedora-pipeline': ['master', 'https://github.com/CentOS-PaaS-SIG/upstream-fedora-pipeline.git'],
'contra-lib': ['master', 'https://github.com/openshift/contra-lib.git']]
libraries.each { name, repo ->
library identifier: "${name}@${repo[0]}",
retriever: modernSCM([$class: 'GitSCMSource',
remote: repo[1]])
}
properties(
[
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')),
pipelineTriggers(
[[$class: 'CIBuildTrigger',
noSquash: true,
providerData: [
$class: 'RabbitMQSubscriberProviderData',
name: 'FedoraMessaging',
overrides: [
topic: 'org.fedoraproject.prod.pungi.compose.status.change',
queue: 'osci-pipelines-queue-0'
],
checks: [
[field: 'release_short', expectedValue: 'Fedora-Cloud$|Fedora$'],
[field: 'release_type', expectedValue: 'ga'],
[field: 'status', expectedValue: 'FINISHED'],
]
]
]]
),
parameters(
[
string(defaultValue: "", description: 'CI_MESSAGE', name: 'CI_MESSAGE'),
string(defaultValue: "", description: 'MESSAGE_HEADERS', name: 'MESSAGE_HEADERS'),
string(defaultValue: "10", description: 'Number of interactions', name: 'INTERACTIONS')
]
)
]
)
node('master') {
cimessage = readJSON text: env.CI_MESSAGE
currentBuild.displayName = "${cimessage['release_version']} - ${cimessage['compose_id']}"
if (cimessage['release_version'] == "Rawhide") {
env.job_name = "fedora-rawhide-image-test"
} else {
env.job_name = "fedora-f${cimessage['release_version']}-image-test"
}
build job: "${env.job_name}",
parameters: [string(name: 'CI_MESSAGE', value: env.CI_MESSAGE)],
wait: false
}