Skip to content

Commit 7f1301c

Browse files
committed
[Build] Migrate Promotion and Make-Visble jobs to Jenkins pipeline
and clean them up.
1 parent 4072043 commit 7f1301c

File tree

8 files changed

+215
-245
lines changed

8 files changed

+215
-245
lines changed

JenkinsJobs/Releng/FOLDER.groovy

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
folder('Releng') {
2-
description('Jobs related to routine releng tasks. Some are periodic, some are "manual" jobs ran only when needed.')
2+
description('Jobs related to routine releng tasks. Some are periodic, some are "manual" jobs ran only when needed.')
33
}
44

55
pipelineJob('Releng/PublishToMaven'){
@@ -48,7 +48,7 @@ Snapshots are published to <a href="https://repo.eclipse.org/content/repositorie
4848
Releases are published to <a href="https://repo1.maven.org/maven2/org/eclipse/">Maven central</a> by publishing to a <a href="https://oss.sonatype.org/#stagingRepositories">staging repository</a>.
4949
</li>
5050
</ul>
51-
''')
51+
''')
5252
}
5353
definition {
5454
cpsScm {
@@ -86,3 +86,91 @@ pipelineJob('Releng/prepareNextDevCycle'){
8686
}
8787
}
8888

89+
pipelineJob('Releng/renameAndPromote'){
90+
displayName('Rename and Promote')
91+
description('''\
92+
This job does the "stage 1" or first part of a promotion.
93+
It renames the files for Equinox and Eclipse, creates an appropriate repo on 'downloads', rsync's everything to 'downloads', but leave everything "invisible" -- unless someone knows the exact URL.
94+
This allows two things. First, allows artifacts some time to "mirror" when that is needed.
95+
But also, allows the sites and repositories to be examined for correctness before making them visible to the world.
96+
The second (deferred) step that makes things visible works, in part, based on some output of this first step. Hence, they must "share a workspace".
97+
''')
98+
parameters {
99+
stringParam('DROP_ID', null, '''\
100+
The name (or, build id) of the build to rename and promote. Typically would be a value such as I20160530-2000 or M20160912-1000.
101+
It must match the name of the build on the build machine.
102+
''')
103+
stringParam('CHECKPOINT', null, 'M1, M3, RC1, RC2, RC3 etc (blank for final releases).')
104+
stringParam('SIGNOFF_BUG', null, 'The issue that was used to "signoff" the checkpoint. If there are no unit test failures, this can be left blank. Otherwise a link is added to test page explaining that "failing unit tests have been investigated".')
105+
stringParam('TRAIN_NAME', null, 'The name of the release stream, typically yyyy-mm. For example: 2022-09')
106+
stringParam('STREAM', null, 'Needs to be all three files of primary version for the release, such as 4.7.1 or 4.8.0.')
107+
stringParam('DL_TYPE', null, "This is the build type we are promoting TO. I-builds promote to 'S' until 'R'.")
108+
stringParam('TAG', null, ''' For passing to the tagEclipseRelease job.
109+
R is used for release builds. For example: R4_25
110+
S is used for milestones and includes the milestone version. For example: S4_25_0_RC2
111+
''')
112+
}
113+
definition {
114+
cpsScm {
115+
lightweight(true)
116+
scm {
117+
github('eclipse-platform/eclipse.platform.releng.aggregator', 'master')
118+
}
119+
scriptPath('JenkinsJobs/Releng/renameAndPromote.jenkinsfile')
120+
}
121+
}
122+
}
123+
124+
pipelineJob('Releng/tagEclipseRelease'){
125+
displayName('Tag Eclipse Release')
126+
description('Tag promoted builds.')
127+
parameters {
128+
stringParam('tag', null, '''\
129+
R is used for release builds. For example: R4_25
130+
S is used for milestones and includes the milestone version. For example: S4_25_0_RC2
131+
''')
132+
stringParam('buildID', null, 'I-build ID of the build that was promoted, for example: I20220831-1800')
133+
stringParam('annotation', null, '''\
134+
GitHub issue to track tagging the release, for example:
135+
'https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/3058' - Tag Eclipse 4.36 release
136+
''')
137+
}
138+
definition {
139+
cpsScm {
140+
lightweight(true)
141+
scm {
142+
github('eclipse-platform/eclipse.platform.releng.aggregator', 'master')
143+
}
144+
scriptPath('JenkinsJobs/Releng/tagEclipseRelease.jenkinsfile')
145+
}
146+
}
147+
}
148+
149+
pipelineJob('Releng/makeVisible'){
150+
displayName('Make Visible')
151+
description('''\
152+
The first part of doing a promotion -- the Rename And Promote job -- creates some scripts that make this deferred "make visible" part possible.
153+
Therefore, they have to share a 'workspace', and the output of the first job must remain in place until its time to "make visible".
154+
''')
155+
parameters {
156+
stringParam('DROP_ID', null, '''\
157+
The name (or, build id) of the build to rename and promote. Typically would be a value such as I20160530-2000 or M20160912-1000.
158+
It must match the name of the build on the build machine.
159+
''')
160+
stringParam('CHECKPOINT', null, 'M1, M3, RC1, RC2, RC3 etc (blank for final releases).')
161+
stringParam('SIGNOFF_BUG', null, 'The issue that was used to "signoff" the checkpoint. If there are no unit test failures, this can be left blank. Otherwise a link is added to test page explaining that "failing unit tests have been investigated".')
162+
stringParam('TRAIN_NAME', null, 'The name of the release stream, typically yyyy-mm. For example: 2022-09')
163+
stringParam('STREAM', null, 'Needs to be all three files of primary version for the release, such as 4.7.1 or 4.8.0.')
164+
stringParam('DL_TYPE', null, "This is the build type we are promoting TO. I-builds promote to 'S' until 'R'.")
165+
}
166+
definition {
167+
cpsScm {
168+
lightweight(true)
169+
scm {
170+
github('eclipse-platform/eclipse.platform.releng.aggregator', 'master')
171+
}
172+
scriptPath('JenkinsJobs/Releng/makeVisible.jenkinsfile')
173+
}
174+
}
175+
}
176+

JenkinsJobs/Releng/makeVisible.groovy

Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
pipeline {
2+
options {
3+
skipDefaultCheckout()
4+
timestamps()
5+
timeout(time: 15, unit: 'MINUTES')
6+
buildDiscarder(logRotator(numToKeepStr:'5'))
7+
}
8+
agent {
9+
label 'basic'
10+
}
11+
stages {
12+
stage('Make visible') {
13+
steps {
14+
sshagent(['projects-storage.eclipse.org-bot-ssh', 'github-bot-ssh']) {
15+
sh '''
16+
curl -o makeVisible.sh https://download.eclipse.org/eclipse/relengScripts/cje-production/promotion/makeVisible.sh
17+
chmod +x makeVisible.sh
18+
./makeVisible.sh
19+
'''
20+
}
21+
build job: 'Releng/updateIndex', wait: false
22+
}
23+
}
24+
}
25+
}

JenkinsJobs/Releng/renameAndPromote.groovy

Lines changed: 0 additions & 75 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
pipeline {
2+
options {
3+
skipDefaultCheckout()
4+
timestamps()
5+
timeout(time: 120, unit: 'MINUTES')
6+
buildDiscarder(logRotator(numToKeepStr:'5'))
7+
}
8+
agent {
9+
label 'basic'
10+
}
11+
stages {
12+
stage('Rename and Promote') {
13+
steps {
14+
sshagent(['projects-storage.eclipse.org-bot-ssh']) {
15+
sh '''#!/bin/bash -x
16+
curl -o promoteSites.sh https://download.eclipse.org/eclipse/relengScripts/cje-production/promotion/promoteSites.sh
17+
chmod +x promoteSites.sh
18+
./promoteSites.sh
19+
'''
20+
}
21+
build job: 'Releng/tagEclipseRelease', wait: true, propagate: true, parameters: [
22+
string(name: 'tag', value: "${TAG}"),
23+
string(name: 'buildID', value: "${DROP_ID}"),
24+
string(name: 'annotation', value: "${ params.SIGNOFF_BUG ? 'https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/' + params.SIGNOFF_BUG : '' }")
25+
]
26+
}
27+
}
28+
}
29+
post {
30+
always {
31+
archiveArtifacts '**/stage2output*/**'
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)