Skip to content

Commit 8585806

Browse files
committed
[Build|RelEng] Avoid hard coded release numbers in test executions
to simplify release engineering tasks. In the beginning, read the values for all stream specific properties from the buildproperties.txt file and make sure all values are passed through the test pipeline via the generated production.properties file. Remove effectively unused equinoxp2tests.properties file as it's content is regenerated in the beginning of the test execution anyways (with different content).
1 parent a00f6bd commit 8585806

File tree

10 files changed

+68
-308
lines changed

10 files changed

+68
-308
lines changed

JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ pipeline {
192192
replaceInFile('eclipse.platform.releng/features/org.eclipse.platform-feature/rootfiles/.eclipseproduct', [
193193
"version=${PREVIOUS_RELEASE_VERSION}.0" : "version=${NEXT_RELEASE_VERSION}.0",
194194
])
195-
replaceInFile('production/testScripts/configuration/streamSpecific.properties', [
196-
"for ${PREVIOUS_RELEASE_VERSION}.0 builds" : "for ${NEXT_RELEASE_VERSION}.0 builds",
197-
])
198195
script {
199196
utilities.modifyJSON('JenkinsJobs/buildConfigurations.json') { builds ->
200197
// Create I-build for new stream and move previous I-build to maintenance branch to allow late re-spins
@@ -228,18 +225,6 @@ pipeline {
228225
'BASEBUILD_ID=".*"' : "BASEBUILD_ID=\"${PREVIOUS_RELEASE_CANDIDATE_I_BUILD}\"",
229226
'PREVIOUS_RELEASE_ID=".*"' : "PREVIOUS_RELEASE_ID=\"${PREVIOUS_RELEASE_CANDIDATE_ID}\"",
230227
])
231-
replaceAllInFile('eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/resources/equinoxp2tests.properties', [
232-
'eclipse-platform-\\d+.\\d+-' : "eclipse-platform-${PREVIOUS_RELEASE_CANDIDATE_TAG}-",
233-
'org.eclipse.equinox.p2.tests.last.release.build.repo=.*' : "org.eclipse.equinox.p2.tests.last.release.build.repo=https://download.eclipse.org/equinox/drops/${PREVIOUS_RELEASE_CANDIDATE_ID}/",
234-
])
235-
replaceAllInFile('eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/resources/label.properties', [
236-
'previousReleaseVersion=.*' : "previousReleaseVersion=${PREVIOUS_RELEASE_CANDIDATE_TAG}",
237-
])
238-
replaceAllInFile('production/testScripts/configuration/streamSpecific.properties', [
239-
'previousReleaseLocation=.*' : 'previousReleaseLocation=https://\\${DOWNLOAD_HOST}/eclipse/downloads/drops4/' + PREVIOUS_RELEASE_CANDIDATE_ID + '/',
240-
'previousReleaseVersion=.*' : "previousReleaseVersion=${PREVIOUS_RELEASE_CANDIDATE_TAG}",
241-
'previousReleaseVersionRepo=.*' : "previousReleaseVersionRepo=${PREVIOUS_RELEASE_VERSION}-I-builds",
242-
])
243228

244229
gitCommitAllExcludingSubmodules("Move previous version to ${PREVIOUS_RELEASE_CANDIDATE_TAG} in build scripts")
245230
}

JenkinsJobs/Releng/promoteBuild.jenkinsfile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -222,18 +222,6 @@ pipeline {
222222
'BASEBUILD_ID=".*?"' : "BASEBUILD_ID=\"${DL_DROP_ID}\"",
223223
'PREVIOUS_RELEASE_ID=".*?"' : "PREVIOUS_RELEASE_ID=\"${DL_DROP_ID}\"",
224224
])
225-
utilities.replaceAllInFile('eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/resources/equinoxp2tests.properties', [
226-
'eclipse-platform-\\d+.\\d+[^-]*?-' : "eclipse-platform-${BUILD_MAJOR}.${BUILD_MINOR}-",
227-
'org.eclipse.equinox.p2.tests.last.release.build.repo=.*' : "org.eclipse.equinox.p2.tests.last.release.build.repo=https://download.eclipse.org/equinox/drops/${DL_DROP_ID}/",
228-
])
229-
utilities.replaceAllInFile('eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/resources/label.properties', [
230-
'previousReleaseVersion=.*' : "previousReleaseVersion=${BUILD_MAJOR}.${BUILD_MINOR}",
231-
])
232-
utilities.replaceAllInFile('production/testScripts/configuration/streamSpecific.properties', [
233-
'previousReleaseLocation=.*' : 'previousReleaseLocation=https://\\${DOWNLOAD_HOST}/eclipse/downloads/drops4/' + DL_DROP_ID + '/',
234-
'previousReleaseVersion=.*' : "previousReleaseVersion=${BUILD_MAJOR}.${BUILD_MINOR}",
235-
'previousReleaseVersionRepo=.*' : "previousReleaseVersionRepo=${BUILD_MAJOR}.${BUILD_MINOR}",
236-
])
237225
utilities.modifyJSON('JenkinsJobs/buildConfigurations.json') { builds ->
238226
// Remove old I/Y-build jobs for this release
239227
builds.values().each{ build -> build.streams.remove("${BUILD_MAJOR}.${BUILD_MINOR}") }

RELEASE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ Previously they were created in ther own job:
156156
- **Set Previous Version to RC2**
157157
- RC2 becomes the new baseline for the week before the GA release.
158158
- Update previous-release.baseline in [eclipse-platform-parent/pom.xml](eclipse-platform-parent/pom.xml)
159-
- Update the last release build versions in [eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/resources/equinoxp2tests.properties](eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/resources/equinoxp2tests.properties)
160-
- Update the previousReleaseVersion in [eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/resources/label.properties](eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/resources/label.properties)
161159

162160
**RC2a Release**
163161
* Sometimes there is a critical issue that requires a fix, if it's decided that one is needed then an RC2a (followed by RC2b, RC2c etc if necessary) is built from the maintenance branch and promoted using the RC2 process.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The eclipse-cbi-plugin mojo doesn't create parent directories:
2+
- https://github.com/eclipse-cbi/org.eclipse.cbi/issues/748

eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/resources/equinoxp2tests.properties

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

eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/resources/label.properties

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

production/testScripts/bootstrap/getEBuilder.xml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@
7474

7575
<antcall target="fetchEBuilderFromGit" />
7676

77-
<antcall target="readEclipseStream"/>
78-
<property file="${WORKSPACE}/${projectName}/stream.properties"/>
79-
<echo message="eclipseStream: ${eclipseStream}" />
80-
8177
<ant antfile="${WORKSPACE}/${eScriptLocation}/runTests2.xml" />
8278

8379
</target>
@@ -96,24 +92,13 @@
9692
</exec>
9793
<exec executable="git"
9894
dir="${WORKSPACE}/${projectName}" failonerror="true">
99-
<arg line="sparse-checkout set --no-cone production/ eclipse-platform-parent/"/>
95+
<arg line="sparse-checkout set --no-cone production/ cje-production/buildproperties.txt"/>
10096
</exec>
10197
<exec executable="git"
10298
dir="${WORKSPACE}/${projectName}" failonerror="true">
10399
<arg line="checkout"/>
104100
</exec>
105101

106102
</target>
107-
<target name="readEclipseStream"
108-
unless="eclipseStream">
109-
<xmlproperty
110-
file="${WORKSPACE}/${projectName}/eclipse-platform-parent/pom.xml"
111-
prefix="eclipse-parent"/>
112-
<!-- This target is called with a separate project and writes the stream property to a file,
113-
which is read by the caller to not propagate back all properties read from the pom.xml.-->
114-
<echo
115-
message="eclipseStream=${eclipse-parent.project.properties.releaseVersion}.0"
116-
file="${WORKSPACE}/${projectName}/stream.properties"/>
117-
</target>
118103

119104
</project>

production/testScripts/configuration/sdk.tests/testScripts/test.xml

Lines changed: 20 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@
7575
</target>
7676

7777
<target
78-
name="installPreferences"
79-
depends="initStreamSpecificProperties">
78+
name="installPreferences">
8079
<property
8180
name="preferenceDirectory"
8281
value="${eclipse-home}/configuration/.settings/" />
@@ -469,6 +468,7 @@
469468
</target>
470469
<target
471470
name="initProductionProperties"
471+
unless="productionPropertiesInitialized"
472472
depends="initWorkspace">
473473
<!--
474474
during production testing, previous steps persists some properties
@@ -477,20 +477,18 @@
477477
-->
478478
<property file="${WORKSPACE}/production.properties" />
479479

480-
</target>
481-
<target
482-
name="initBuildId"
483-
unless="buildId">
484-
<!--property file that can contain the buildId, if not otherwise set -->
485-
<property file="label.properties" />
486-
<fail
487-
unless="buildId"
488-
message="buildId (e.g I20140731-0800) needs to be provided to run the tests" />
480+
<echo message="eclipseStreamMajor: ${eclipseStreamMajor}"/>
481+
<echo message="eclipseStreamMinor: ${eclipseStreamMinor}"/>
482+
<fail unless="eclipseStreamMajor"
483+
message="eclipseStreamMajor not defined or computable" />
484+
<fail unless="eclipseStreamMinor"
485+
message="eclipseStreamMinor not defined or computable" />
486+
487+
<property name="productionPropertiesInitialized" value="true" />
489488
</target>
490489

491490
<target
492491
name="initBuildType"
493-
depends="initBuildId"
494492
unless="buildType">
495493

496494
<fail
@@ -534,103 +532,27 @@
534532
</target>
535533
<target
536534
name="initCurrentUpdateSite"
537-
depends="initDownloadHosts, initStreamVariables, initBuildId, initBuildType"
535+
depends="initDownloadHosts, initProductionProperties, initBuildType"
538536
unless="currentUpdateSite">
539537
<property
540538
name="currentUpdateSite"
541539
value="https://${DOWNLOAD_HOST}/eclipse/updates/${updateSiteSegment}-${buildType}-builds/${buildId}" />
542540
</target>
543-
<target
544-
name="initStreamSpecificProperties"
545-
depends="initConfigurationDir"
546-
unless="streamSpecificPropertiesSet">
547-
<!--
548-
Note: configurationDir used to be set by runTest2.xml in 'production'
549-
environment only. We may want to set to basedir, if not already set.
550-
But, this file, streamSpecific.properties should always be optional.
551-
TODO: better document what is in that file.
552-
-->
553-
554-
<property file="${configurationDir}/streamSpecific.properties" />
555-
<property
556-
name="streamSpecificPropertiesSet"
557-
value="true" />
558-
</target>
559-
560-
<!--
561-
main purpose of initStreamVariables, it to be sure we have eclipseStreamMajor
562-
and eclipseStreamMinor. Uses Javascript, which requires Java 1.6 (or ... else gets complicated to
563-
setup)
564-
-->
565-
<target
566-
name="initStreamVariables"
567-
depends="initDownloadHosts,initConfigurationDir,initStreamSpecificProperties">
568-
569-
<property file="${configurationDir}/streamSpecific.properties" />
570-
<fail
571-
unless="eclipseStream"
572-
message="eclipseStream value must be provided by caller, such as '4.3.0'." />
573-
<!--
574-
Not clear why, but I've seen "eclipseStream" value have a trailing
575-
?blank? that gets picked up when read in as string.
576-
Seems it might be a couple of ant issues?
577-
Luckily we never use it as a whole string (just major and minor)
578-
so we can ignore spaces.
579-
-->
580-
<condition property="streamOK">
581-
<matches
582-
pattern="^\s*\d+\.\d+(\.\d+)?\s*$"
583-
string="${eclipseStream}" />
584-
</condition>
585-
<fail
586-
message="eclipseStream variable had unexpected format. Should be of form digit.digit[.digit], but was ${eclipseStream}"
587-
unless="streamOK" />
588-
589-
<loadresource property="eclipseStreamMajor">
590-
<string value="${eclipseStream}"/>
591-
<filterchain>
592-
<tokenfilter>
593-
<replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\1"/>
594-
</tokenfilter>
595-
</filterchain>
596-
</loadresource>
597-
<echo message="eclipseStreamMajor: ${eclipseStreamMajor}"/>
598-
599-
<loadresource property="eclipseStreamMinor">
600-
<string value="${eclipseStream}"/>
601-
<filterchain>
602-
<tokenfilter>
603-
<replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\2"/>
604-
</tokenfilter>
605-
</filterchain>
606-
</loadresource>
607-
<echo message="eclipseStreamMinor: ${eclipseStreamMinor}"/>
608-
<fail
609-
unless="eclipseStreamMajor"
610-
message="eclipseStreamMajor not defined or computable" />
611-
<fail
612-
unless="eclipseStreamMinor"
613-
message="eclipseStreamMinor not defined or computable" />
614-
<!--
615-
<fail
616-
unless="eclipseStreamService"
617-
message="eclipseStreamService not defined or computable" />
618-
-->
619-
</target>
620541

621542
<target
622543
name="initBasicDirectories"
623-
depends="initWorkspace,initBuildId, initStreamSpecificProperties,initInstallDir, initEclipseHome"
544+
depends="initWorkspace, initInstallDir, initEclipseHome"
624545
unless="basicDirectoriesInitialized">
625546

547+
<fail
548+
unless="buildId"
549+
message="buildId value must be provided by caller (such as 'I20120717-0800'" />
550+
626551
<property environment="env" />
627552

628-
<property
629-
name="repoBuildIdToUse"
630-
value="${buildId}" />
631553
<property
632554
name="repoZip"
633-
value="${executionDir}/eclipse-junit-tests-${repoBuildIdToUse}.zip" />
555+
value="${executionDir}/eclipse-junit-tests-${buildId}.zip" />
634556
<echo message="repoZip: ${repoZip}" />
635557

636558
<property
@@ -687,15 +609,9 @@
687609
</copy>
688610
</target>
689611

690-
<target name="initConfigurationDir">
691-
<property
692-
name="configurationDir"
693-
value="${WORKSPACE}/eclipse.platform.releng.aggregator/production/testScripts/configuration" />
694-
</target>
695-
696612
<target
697613
name="initInstallDir"
698-
depends="initBuildId, initStreamSpecificProperties, checkInstallDir"
614+
depends="checkInstallDir"
699615
unless="install">
700616
<property
701617
name="testDir"
@@ -732,7 +648,7 @@
732648
-->
733649
<target
734650
name="initEclipseHome"
735-
depends="initStreamSpecificProperties, initInstallDir, checkEclipseHome"
651+
depends="initInstallDir, checkEclipseHome"
736652
unless="eclipse-home">
737653

738654
<condition
@@ -784,7 +700,7 @@
784700

785701
<target
786702
name="init"
787-
depends="initWorkspace,initProductionProperties,initBuildId, initBuildType, initDownloadHosts, initStreamVariables, initCurrentUpdateSite, initBasicDirectories,initPlatformAndRuntimeArchiveName"
703+
depends="initWorkspace,initProductionProperties, initBuildType, initDownloadHosts, initCurrentUpdateSite, initBasicDirectories,initPlatformAndRuntimeArchiveName"
788704
unless="testingIsInitialized">
789705

790706
<!-- Make sure the values of os, ws, and arch are set. -->
@@ -851,9 +767,6 @@
851767
<property
852768
name="org.eclipse.equinox.p2.reconciler.tests.platform.archive"
853769
value="${executionDir}/${platformArchive}" />
854-
<property
855-
name="org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive"
856-
value="NotCurrentlyImplementedOrUsed" />
857770
<property
858771
name="org.eclipse.equinox.p2.tests.current.build.repo"
859772
value="${current.build.repo}" />
@@ -887,10 +800,6 @@
887800
message="org.eclipse.equinox.p2.reconciler.tests.platform.archive=${org.eclipse.equinox.p2.reconciler.tests.platform.archive}${EOL}"
888801
file="${executionDir}/equinoxp2tests.properties"
889802
append="true" />
890-
<echo
891-
message="org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive=${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive}${EOL}"
892-
file="${executionDir}/equinoxp2tests.properties"
893-
append="true" />
894803
<echo
895804
message="org.eclipse.equinox.p2.tests.current.build.repo=${current.build.repo}${EOL}"
896805
file="${executionDir}/equinoxp2tests.properties"

production/testScripts/configuration/streamSpecific.properties

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

0 commit comments

Comments
 (0)