Skip to content

Commit baa2c7d

Browse files
committed
add jenkinsfile_branches back in in case we need it for release
1 parent e3f3240 commit baa2c7d

File tree

1 file changed

+123
-0
lines changed

1 file changed

+123
-0
lines changed
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
#!groovy
2+
3+
pipeline {
4+
5+
agent {
6+
label {
7+
label("sl7cloud")
8+
}
9+
}
10+
11+
options {
12+
buildDiscarder(logRotator(numToKeepStr:'5'))
13+
disableConcurrentBuilds()
14+
timestamps()
15+
// as we "checkout scm" as a stage, we do not need to do it here too
16+
skipDefaultCheckout(true)
17+
office365ConnectorWebhooks([[
18+
name: "Office 365",
19+
notifyBackToNormal: true,
20+
startNotification: false,
21+
notifyFailure: true,
22+
notifySuccess: false,
23+
notifyNotBuilt: false,
24+
notifyAborted: false,
25+
notifyRepeatedFailure: true,
26+
notifyUnstable: true,
27+
url: "${env.MSTEAMS_URL}"
28+
]]
29+
)
30+
}
31+
32+
stages {
33+
34+
stage("Checkout") {
35+
steps {
36+
echo "Branch: ${env.BRANCH_NAME}"
37+
checkout scm
38+
}
39+
}
40+
41+
stage('Set params') {
42+
steps {
43+
script {
44+
properties([
45+
parameters([
46+
string(
47+
name: "VERSION",
48+
description: "The release version in X.x.m format e.g. 12.3.2",
49+
trim: true
50+
),
51+
booleanParam(
52+
name: "REMOTE",
53+
description: "Update submodules to latest version from remote. Defaults to false, appropriate for a normal release",
54+
defaultValue: false
55+
),
56+
string(
57+
name: "TAG",
58+
description: "Commit to branch release from. Defaults to 'HEAD', appropriate for a normal release. May need to set specific TAG here for patch release.",
59+
defaultValue: "HEAD",
60+
trim: true
61+
),
62+
booleanParam(
63+
name: "EPICS",
64+
description: "Create release branches for EPICS and submodules.",
65+
defaultValue: true
66+
),
67+
booleanParam(
68+
name: "IBEX_GUI",
69+
description: "Create release branch for IBEX GUI.",
70+
defaultValue: true,
71+
),
72+
booleanParam(
73+
name: "SCRIPT_GENERATOR",
74+
description: "Create release branch for the Script Generator.",
75+
defaultValue: true
76+
),
77+
booleanParam(
78+
name: "UKTENA",
79+
description: "Create release branch for Uktena Python distribution.",
80+
defaultValue: true
81+
),
82+
booleanParam(
83+
name: "JSON_BOURNE",
84+
description: "Create release branch for JSON_bourne.",
85+
defaultValue: false
86+
)
87+
])
88+
])
89+
}
90+
}
91+
}
92+
93+
stage("Create release branches") {
94+
steps {
95+
sh """
96+
python3 -m pip install -r release_scripts/requirements.txt --user
97+
python3 -u release_scripts/branches.py --version ${params.VERSION}
98+
"""
99+
}
100+
}
101+
102+
stage("Start release builds") {
103+
steps {
104+
script {
105+
if (params.EPICS) {
106+
build job: "EPICS_release", propagate: false, wait: false
107+
build job: "EPICS_release32", propagate: false, wait: false
108+
}
109+
if (params.UKTENA) {
110+
build job: "uktena_release_pipeline", propagate: false, wait: false
111+
}
112+
if (params.IBEX_GUI) {
113+
build job: "ibex_gui_releases_pipeline", propagate: false, wait: false
114+
}
115+
if (params.SCRIPT_GENERATOR) {
116+
build job: "scriptgenerator_release", propagate: false, wait: false
117+
}
118+
// currently no release job for JSON_Bourne but it is not deployed to instruments directly
119+
}
120+
}
121+
}
122+
}
123+
}

0 commit comments

Comments
 (0)