Skip to content

Commit d5f9624

Browse files
committed
[Build] Create new stream repositories in release preparation pipeline
Additionally add the previous release RC as first children immediately to the new I-build repository so that it isn't empty and the RC is used as baseline for the first builds of the new stream.
1 parent 85911dd commit d5f9624

File tree

3 files changed

+62
-37
lines changed

3 files changed

+62
-37
lines changed

JenkinsJobs/Releng/newStreamRepos.groovy

Lines changed: 0 additions & 33 deletions
This file was deleted.

JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,42 @@ pipeline {
159159
commitAllChangesExcludingSubmodules("Move previous version to ${PREVIOUS_RELEASE_CANDIDATE_TAG} in build scripts")
160160
}
161161
}
162+
stage ('Create New Stream Repos') {
163+
environment {
164+
ECLIPSE_EXE = installEclipsePlatformProduct("${PREVIOUS_RELEASE_CANDIDATE_ID}", "${PREVIOUS_RELEASE_CANDIDATE_TAG}")
165+
}
166+
steps {
167+
dir("${WORKSPACE}/target/repositories") {
168+
sshagent(['projects-storage.eclipse.org-bot-ssh']) {
169+
sh '''#!/bin/bash -xe
170+
epUpdatesDir='/home/data/httpd/download.eclipse.org/eclipse/updates'
171+
templateRepo="${epUpdatesDir}/template_repo"
172+
173+
releaseRepoName="${NEXT_RELEASE_VERSION}"
174+
iBuildRepoName="${NEXT_RELEASE_VERSION}-I-builds"
175+
yBuildRepoName="${NEXT_RELEASE_VERSION}-Y-builds"
176+
previousRCRepo="https://download.eclipse.org/eclipse/updates/${PREVIOUS_RELEASE_VERSION}-I-builds/${PREVIOUS_RELEASE_CANDIDATE_I_BUILD}/"
177+
178+
# Copy the repo-template to this workspace to create the new I-build repo from it,
179+
# then add the previous release RC as only child and copy the resulting repo back to the download-server
180+
curl -o addToComposite.xml https://download.eclipse.org/eclipse/relengScripts/cje-production/scripts/addToComposite.xml
181+
scp -r [email protected]:${templateRepo} template_repo/
182+
cp -r template_repo ${iBuildRepoName}
183+
184+
taskName='addToComposite'
185+
${ECLIPSE_EXE} -nosplash -consolelog -debug -data ./eclipse-ws \
186+
-application org.eclipse.ant.core.antRunner -file ${taskName}.xml \
187+
${taskName} -Drepodir=$(pwd)/${iBuildRepoName} -Dcomplocation=${previousRCRepo}
188+
if [[ ${DRY_RUN} == 'false' ]]; then
189+
scp -r ${iBuildRepoName} [email protected]:${epUpdatesDir}/${iBuildRepoName}
190+
ssh [email protected] cp -r ${templateRepo} ${epUpdatesDir}/${yBuildRepoName}
191+
ssh [email protected] cp -r ${templateRepo} ${epUpdatesDir}/${releaseRepoName}
192+
fi
193+
'''
194+
}
195+
}
196+
}
197+
}
162198
stage('Deploy parent-pom and SDK-target') {
163199
// Deploy new parent first to ensure it's available when PRs for submodule updates are created.
164200
environment {
@@ -174,7 +210,7 @@ pipeline {
174210
stage('Push preparation branches') {
175211
steps {
176212
sshagent (['github-bot-ssh']) {
177-
sh '''
213+
sh '''#!/bin/bash -x
178214
function pushNewCommitsToPreparationBranch() {
179215
pushURL=$(git config remote.origin.url)
180216
# Switch to SSH, if the configured URL uses HTTPS (we can only push with SSH)
@@ -264,8 +300,17 @@ pipeline {
264300
}
265301
}
266302
}
303+
post {
304+
always {
305+
archiveArtifacts allowEmptyArchive: true, artifacts: '\
306+
target/repositories/**,\
307+
'
308+
}
309+
}
267310
}
268311

312+
// --- utility methods
313+
269314
@NonCPS
270315
def parseDate(String dateString) {
271316
return java.time.LocalDate.parse(dateString.trim()) // expects format 'yyyy-MM-dd'
@@ -294,6 +339,22 @@ def commitAllChangesExcludingSubmodules(String commitMessage) {
294339
}
295340
}
296341

342+
// build tools
343+
344+
def installEclipsePlatformProduct(String releaseID, String releaseVersion){
345+
def eclipseURL = "https://download.eclipse.org/eclipse/downloads/drops4/${releaseID}/eclipse-platform-${releaseVersion}-linux-gtk-x86_64.tar.gz"
346+
return install('eclipse-platform', eclipseURL) + '/eclipse'
347+
}
348+
349+
def install(String toolType, String url) {
350+
dir("${WORKSPACE}/target/tools/${toolType}") {
351+
sh "curl -L ${url} | tar -xzf -"
352+
return "${pwd()}/" + sh(script: 'ls', returnStdout: true).trim()
353+
}
354+
}
355+
356+
// Github API interactions
357+
297358
def listReposOfOrganization(String orga) {
298359
def response = queryGithubAPI('', "orgs/${orga}/repos", null)
299360
if (!(response instanceof List) && (response.errors || (response.status && response.status != 201))) {

RELEASE.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,6 @@ The release is scheduled for 10AM EST. Typically the jobs are scheduled beforeha
187187
This should move the current I-builds to run on the maintenance branch and create new I-builds for the next release.
188188
Performance and Unit tests should also be generated for the new release automatically.
189189

190-
#### **Create new Stream Repos:**
191-
- Run the [Create New Stream Repos](https://ci.eclipse.org/releng/job/Releng/job/newStreamRepos/) job to make an I-builds repo for the next release.
192-
193190
#### **Create Git Milestones for the next Release:**
194191

195192
Milestones are already created by running [`Prepare Next Development Cycle`](https://ci.eclipse.org/releng/job/Releng/job/prepareNextDevCycle/) job.

0 commit comments

Comments
 (0)