Skip to content

Commit e961416

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 084a330 commit e961416

File tree

3 files changed

+64
-37
lines changed

3 files changed

+64
-37
lines changed

JenkinsJobs/Releng/newStreamRepos.groovy

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

JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,45 @@ 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+
//TODO: check variable access style!
165+
ECLIPSE = installEclipsePlatformProduct("${PREVIOUS_RELEASE_CANDIDATE_ID}", "${PREVIOUS_RELEASE_CANDIDATE_TAG}")
166+
}
167+
steps {
168+
dir("${WORKSPACE}/target/repositories") {
169+
sshagent(['projects-storage.eclipse.org-bot-ssh']) {
170+
//TODO: check and unify shebang!
171+
sh '''#!/bin/bash -x -e
172+
#TODO: clean up. Check commented out things
173+
epUpdatesDir='/home/data/httpd/download.eclipse.org/eclipse/updates'
174+
templateRepo="${epUpdatesDir}/template_repo/"
175+
176+
releaseRepoName="${NEXT_RELEASE_VERSION}/"
177+
iBuildRepoName="${NEXT_RELEASE_VERSION}-I-builds/"
178+
yBuildRepoName="${NEXT_RELEASE_VERSION}-Y-builds/"
179+
previousRCRepo="https://download.eclipse.org/eclipse/updates/${PREVIOUS_RELEASE_VERSION}-I-builds/${PREVIOUS_RELEASE_CANDIDATE_I_BUILD}/"
180+
181+
# Copy the template to this workspace to create the new I-build repo from it,
182+
#add the previous release RC as only child and copy the resulting repo to the server
183+
curl -o addToComposite.xml https://download.eclipse.org/eclipse/relengScripts/cje-production/scripts/addToComposite.xml
184+
scp -r [email protected]:${templateRepo} template_repo/
185+
cp -r template_repo ${iBuildRepoName}
186+
187+
markingScriptName='addToComposite'
188+
${ECLIPSE} -nosplash -consolelog -debug -data ./eclipse-ws \
189+
-application org.eclipse.ant.core.antRunner -file ${markingScriptName}.xml \
190+
${markingScriptName} -Drepodir=$(pwd)/${iBuildRepoName} -Dcomplocation=${previousRCRepo}
191+
if [[ ${DRY_RUN} == 'false' ]]; then
192+
scp ${iBuildRepoName} [email protected]:${epUpdatesDir}/${iBuildRepoName}
193+
ssh [email protected] cp -r ${templateRepo} ${epUpdatesDir}/${releaseRepoName}
194+
ssh [email protected] cp -r ${templateRepo} ${epUpdatesDir}/${yBuildRepoName}
195+
fi
196+
'''
197+
}
198+
}
199+
}
200+
}
162201
stage('Deploy parent-pom and SDK-target') {
163202
// Deploy new parent first to ensure it's available when PRs for submodule updates are created.
164203
environment {
@@ -174,7 +213,7 @@ pipeline {
174213
stage('Push preparation branches') {
175214
steps {
176215
sshagent (['github-bot-ssh']) {
177-
sh '''
216+
sh '''#!/bin/bash -x
178217
function pushNewCommitsToPreparationBranch() {
179218
pushURL=$(git config remote.origin.url)
180219
# Switch to SSH, if the configured URL uses HTTPS (we can only push with SSH)
@@ -264,8 +303,16 @@ pipeline {
264303
}
265304
}
266305
}
306+
post {
307+
always {
308+
archiveArtifacts allowEmptyArchive: true, artifacts: '\
309+
/target/repositories/**'
310+
}
311+
}
267312
}
268313

314+
// --- utility methods
315+
269316
@NonCPS
270317
def parseDate(String dateString) {
271318
return java.time.LocalDate.parse(dateString.trim()) // expects format 'yyyy-MM-dd'
@@ -294,6 +341,22 @@ def commitAllChangesExcludingSubmodules(String commitMessage) {
294341
}
295342
}
296343

344+
// build tools
345+
346+
def installEclipsePlatformProduct(String releaseID, String releaseVersion){
347+
def eclipseURL = "https://download.eclipse.org/eclipse/downloads/drops4/${releaseID}/eclipse-platform-${releaseVersion}-linux-gtk-x86_64.tar.gz"
348+
return install('eclipse-platform', eclipseURL) + '/eclipse'
349+
}
350+
351+
def install(String toolType, String url) {
352+
dir("${WORKSPACE}/target/tools/${toolType}") {
353+
sh "curl -L ${url} | tar -xzf -"
354+
return "${pwd()}/" + sh(script: 'ls', returnStdout: true).trim()
355+
}
356+
}
357+
358+
// Github API interactions
359+
297360
def listReposOfOrganization(String orga) {
298361
def response = queryGithubAPI('', "orgs/${orga}/repos", null)
299362
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)