Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable nightly build with reproducible comparison #714

Merged
merged 12 commits into from
Jun 12, 2023
2 changes: 1 addition & 1 deletion docs/UsingOurScripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ This file contains the default constants and paths used in the build scripts for
// Test suite and inclusion details
"testDetails" : {
// Boolean denoting wether the reproducible compare is needed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Boolean denoting wether the reproducible compare is needed
// Boolean denoting whether the reproducible compare is needed

"enableReproducibleCompare" :false,
"enableReproducibleCompare" : false,
// Boolean denoting whether pipeline tests will be enabled or disabled by default
"enableTests" : true,
/*
Expand Down
3 changes: 2 additions & 1 deletion pipelines/build/common/build_base_file.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class Builder implements Serializable {
return ''
}
/*
* Get reproduciableCompare flag from the build configurations.
Get reproduciableCompare flag from the build configurations.
*/
Boolean getReproducibleCompare(Map<String, ?> configuration, String variant) {
Boolean enableReproducibleCompare = DEFAULTS_JSON['testDetails']['enableReproducibleCompare'] as Boolean
Expand All @@ -231,6 +231,7 @@ class Builder implements Serializable {
}
return enableReproducibleCompare
}

/*
sophia-guo marked this conversation as resolved.
Show resolved Hide resolved
Get the list of tests to run from the build configurations.
We run different test categories depending on if this build is a release or nightly. This function parses and applies this to the individual build config.
Expand Down
1 change: 1 addition & 0 deletions pipelines/build/common/config_regeneration.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ class Regeneration implements Serializable {
}
return enableReproducibleCompare
}

/*
sophia-guo marked this conversation as resolved.
Show resolved Hide resolved
* Get the list of tests from jdk*_pipeline_config.groovy. Used when creating the IndividualBuildConfig. Used as a placeholder since the pipelines overwrite this.
* @param configuration
Expand Down
2 changes: 1 addition & 1 deletion pipelines/jobs/release_pipeline_job_template.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pipelineJob("${BUILD_FOLDER}/${JOB_NAME}") {
stringParam('baseFilePath', '', "Relative path to where the build_base_file.groovy file is located. This runs the downstream job setup and configuration retrieval services.<br>Default: <code>${defaultsJson['baseFileDirectories']['upstream']}</code>")
stringParam('buildConfigFilePath', '', "Relative path to where the jdkxx_pipeline_config.groovy file is located. It contains the build configurations for each platform, architecture and variant.<br>Default: <code>${defaultsJson['configDirectories']['build']}/jdkxx_pipeline_config.groovy</code>")
booleanParam('aqaAutoGen', false, 'If set to true, force auto generate AQA test jobs. Defaults to false')
booleanParam('enableReproducibleCompare', runReproducibleCompare, 'If set to true the reproducible compare job might be triggerred')
booleanParam('enableReproducibleCompare', runReproducibleCompare, 'If set to true the reproducible compare job might be triggered')
booleanParam('enableTests', runTests, 'If set to true the test pipeline will be executed')
booleanParam('enableTestDynamicParallel', runParallel, 'If set to true test will be run parallel')
booleanParam('enableInstallers', runInstaller, 'If set to true the installer pipeline will be executed')
Expand Down
8 changes: 4 additions & 4 deletions tools/reproduce_comparison/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ pipeline {

def originalJDKFile = findFiles(glob: "original/*.tar.gz")
def reproducedJDKFile = findFiles(glob: "reproduced/*.tar.gz")
def result1 = sh returnStatus: true, script: "tar -xz ${originalJDKFile[0].name} -C original"
if (result1 != 0 ) {
def untarOriginalJDK = sh returnStatus: true, script: "tar -xz ${originalJDKFile[0].name} -C original"
if (untarOriginalJDK != 0 ) {
currentBuild.result = 'UNSTABLE'
error " Untar ${originalJDKFile[0].name} failed"
return
}
def result2 = sh returnStatus: true, script: "tar -xz ${reproducedJDKFile[0].name} -C reproduced"
if (result2 != 0 ) {
def untarReproducedJDK = sh returnStatus: true, script: "tar -xz ${reproducedJDKFile[0].name} -C reproduced"
if (untarReproducedJDK != 0 ) {
currentBuild.result = 'UNSTABLE'
error " Untar ${reproducedJDKFile[0].name} failed"
return
Expand Down