-
Notifications
You must be signed in to change notification settings - Fork 59
/
create-branches.groovy
54 lines (43 loc) · 2.02 KB
/
create-branches.groovy
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
import groovy.json.JsonSlurper
def curlCMD = "https://raw.github.com/redhat-developer/devspaces/devspaces-3-rhel-8/dependencies/job-config.json".toURL().text
def jsonSlurper = new JsonSlurper();
def config = jsonSlurper.parseText(curlCMD);
def JOB_BRANCHES = [config.Version+""] // only one release at a time, latest 2.yy
for (String JOB_BRANCH : JOB_BRANCHES) {
pipelineJob("${FOLDER_PATH}/${ITEM_NAME}"){
// keep job disabled until we explicitly need it
disabled(true)
MIDSTM_BRANCH="devspaces-3-rhel-8"
FUTURE_BRANCH="devspaces-"+JOB_BRANCH+"-rhel-8"
description('''
This job is meant to be run after upstream deps are available to start the new devspaces-3.y-rhel-8 github branches for the upcoming release.
<p>
See <a href=https://github.com/redhat-developer/devspaces/blob/devspaces-3-rhel-8/product/tagRelease.sh>
https://github.com/redhat-developer/devspaces/blob/devspaces-3-rhel-8/product/tagRelease.sh</a>
<p>To create branches of pkgs.devel repos, open a ticket like <a href=https://projects.engineering.redhat.com/browse/SPMM-4820>SPMM-4820</a>
<p>NOTE: this job is not meant to create tags in repos, as branching occurs BEFORE GA, and tagging occurs AFTER.
''')
properties {
ownership {
primaryOwnerId("nboldt")
}
}
logRotator {
daysToKeep(5)
numToKeep(5)
artifactDaysToKeep(2)
artifactNumToKeep(2)
}
parameters{
stringParam("MIDSTM_BRANCH",MIDSTM_BRANCH,"redhat-developer/devspaces branch to use as source of the new branches")
stringParam("FUTURE_BRANCH",FUTURE_BRANCH,"branch to create")
booleanParam("CLEAN_ON_FAILURE", true, "If false, don't clean up workspace after the build so it can be used for debugging.")
}
definition {
cps{
sandbox(true)
script(readFileFromWorkspace('jobs/CRW_CI/Releng/create-branches.jenkinsfile'))
}
}
}
}