Skip to content

Commit

Permalink
[Build] Fix export of 'TEST_CONFIGURATIONS_EXPECTED' in SSH execution
Browse files Browse the repository at this point in the history
Because in the 'Collect Result' jobs the publish.xml ANT script is
executed remotely on the download-server via SSH the environment
variables defined in the shell on the build-server are not available.
As a workaround, define the 'testsConfigExpected' property explicitly as
command-line argument.

Also rename 'TESTS_CONFIGURATIONS_EXPECTED' to
'TEST_CONFIGURATIONS_EXPECTED' to avoid a double-plural.

Follow-up to
#2693
  • Loading branch information
HannesWell committed Dec 24, 2024
1 parent 5f0e4ca commit 86cd6c1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion JenkinsJobs/Builds/I_build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
MAVEN_OPTS = "-Xmx6G"
CJE_ROOT = "${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production"
logDir = "$CJE_ROOT/buildlogs"
TESTS_CONFIGURATIONS_EXPECTED = \'''' + TEST_CONFIGURATIONS.collect{c ->
TEST_CONFIGURATIONS_EXPECTED = \'''' + TEST_CONFIGURATIONS.collect{c ->
'ep' + MAJOR + MINOR + 'I-unit-' + c.os + '-' + c.arch + '-java' + c.javaVersion + '_' + c.os + '.' + c.ws + '.' + c.arch + '_' + c.javaVersion
}.join(',') + ''''
}
Expand Down
1 change: 1 addition & 0 deletions JenkinsJobs/Releng/collectPerfResults.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ ssh [email protected] ${javaCMD} -jar ${launcherJar} -n
-Djob=${triggeringJob} \\
-DbuildID=${buildID} \\
-DeclipseStream=${STREAM} \\
"-DtestsConfigExpected=${TEST_CONFIGURATIONS_EXPECTED}" \\
-DEBuilderDir=${workspace}
#Delete Workspace
Expand Down
1 change: 1 addition & 0 deletions JenkinsJobs/Releng/collectResults.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ ssh [email protected] ${javaCMD} -jar ${launcherJar} -n
-Djob=${triggeringJob} \\
-DbuildID=${buildID} \\
-DeclipseStream=${STREAM} \\
"-DtestsConfigExpected=${TEST_CONFIGURATIONS_EXPECTED}" \\
-DEBuilderDir=${workspace}
Expand Down
2 changes: 1 addition & 1 deletion JenkinsJobs/YBuilds/Y_build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ spec:
MAVEN_OPTS = "-Xmx6G"
CJE_ROOT = "${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production"
logDir = "$CJE_ROOT/buildlogs"
TESTS_CONFIGURATIONS_EXPECTED = \'''' + TEST_CONFIGURATIONS.collect{c ->
TEST_CONFIGURATIONS_EXPECTED = \'''' + TEST_CONFIGURATIONS.collect{c ->
'ep' + MAJOR + MINOR + 'Y-unit-' + c.os + '-' + c.arch + '-java' + c.javaVersion + '_' + c.os + '.' + c.ws + '.' + c.arch + '_' + c.javaVersion
}.join(',') + ''''
}
Expand Down
1 change: 1 addition & 0 deletions JenkinsJobs/YBuilds/collectYbuildResults.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ ssh [email protected] ${javaCMD} -jar ${launcherJar} -n
-Djob=${triggeringJob} \\
-DbuildID=${buildID} \\
-DeclipseStream=${STREAM} \\
"-DtestsConfigExpected=${TEST_CONFIGURATIONS_EXPECTED}" \\
-DEBuilderDir=${workspace}
#Delete Workspace
Expand Down
2 changes: 1 addition & 1 deletion cje-production/mbscripts/mb010_createEnvfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ fn-addToPropFiles ECLIPSE_BUILDER_DIR "\"$CJE_ROOT/$AGG_DIR/eclipse.platform.rel
fn-addToPropFiles PLATFORM_PRODUCTS_DIR "\"$CJE_ROOT/$AGG_DIR/eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/target/products\""
fn-addToPropFiles PLATFORM_REPO_DIR "\"$CJE_ROOT/$AGG_DIR/eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/target/repository\""
fn-addToPropFiles PLATFORM_TARGET_DIR "\"$CJE_ROOT/$AGG_DIR/eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/target\""
fn-addToPropFiles TESTS_CONFIGURATIONS_EXPECTED "\"${TESTS_CONFIGURATIONS_EXPECTED}\""
fn-addToPropFiles TEST_CONFIGURATIONS_EXPECTED "\"${TEST_CONFIGURATIONS_EXPECTED}\""
4 changes: 2 additions & 2 deletions cje-production/scripts/publish.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
substring="-perf-" />
</condition>
<!-- else normal unit tests configs -->
<property name="testsConfigExpected" value="${env.TESTS_CONFIGURATIONS_EXPECTED}"/>
<property name="testsConfigExpected" value="${env.TEST_CONFIGURATIONS_EXPECTED}"/>

<condition
property="expectedConfigFilename"
Expand Down Expand Up @@ -257,7 +257,7 @@
</loadresource>
<echo message="eclipseStreamService: ${eclipseStreamService}"/>

<property environment="env" />
<property environment="env"/>

</target>

Expand Down

0 comments on commit 86cd6c1

Please sign in to comment.