forked from coreos/fedora-coreos-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.mechanical
35 lines (32 loc) · 905 Bytes
/
Jenkinsfile.mechanical
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
def utils, streams
node {
checkout scm
utils = load("utils.groovy")
streams = load("streams.groovy")
}
properties([
pipelineTriggers(streams.get_push_trigger() + [
// also run every 6h: we could increase the interval more if we start
// triggering on the relevant fedmsgs.
cron("H H/6 * * *")
])
])
node {
change = checkout(
[$class: 'GitSCM',
userRemoteConfigs: [
[url: 'https://github.com/coreos/fedora-coreos-config']
],
branches: streams.as_branches(streams.mechanical)
]
)
if (streams.triggered_by_push()) {
stream = streams.from_branch(change.GIT_BRANCH)
if (stream != "") {
streams.build_stream(stream)
}
} else {
// cron or manual build: build all mechanical streams
streams.mechanical.each{ streams.build_stream(it) }
}
}