diff --git a/pipelines/build/common/build_base_file.groovy b/pipelines/build/common/build_base_file.groovy index 890408eb7..58299d5db 100644 --- a/pipelines/build/common/build_base_file.groovy +++ b/pipelines/build/common/build_base_file.groovy @@ -131,15 +131,15 @@ class Builder implements Serializable { def platformCleanWorkspaceAfterBuild = getCleanWorkspaceAfterBuild(platformConfig) // Always clean on mac due to https://github.com/adoptium/temurin-build/issues/1980 - def cleanWorkspace = cleanWorkspaceBeforeBuild + def cleanWorkspaceBefore = cleanWorkspaceBeforeBuild if (platformConfig.os == 'mac') { - cleanWorkspace = true + cleanWorkspaceBefore = true } - def cleanWsAfter = cleanWorkspaceAfterBuild + def cleanWorkspaceAfter = cleanWorkspaceAfterBuild if (platformCleanWorkspaceAfterBuild) { // Platform override specified - cleanWsAfter = platformCleanWorkspaceAfterBuild + cleanWorkspaceAfter = platformCleanWorkspaceAfterBuild } return new IndividualBuildConfig( @@ -181,8 +181,8 @@ class Builder implements Serializable { ENABLE_TESTDYNAMICPARALLEL: enableTestDynamicParallel, ENABLE_INSTALLERS: enableInstallers, ENABLE_SIGNER: enableSigner, - CLEAN_WORKSPACE: cleanWorkspace, - CLEAN_WORKSPACE_AFTER: cleanWsAfter, + CLEAN_WORKSPACE_BEFORE: cleanWorkspaceBefore, + CLEAN_WORKSPACE_AFTER: cleanWorkspaceAfter, CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER: cleanWorkspaceBuildOutputAfterBuild ) } diff --git a/pipelines/build/common/config_regeneration.groovy b/pipelines/build/common/config_regeneration.groovy index 3e8932228..a85ce76f4 100644 --- a/pipelines/build/common/config_regeneration.groovy +++ b/pipelines/build/common/config_regeneration.groovy @@ -460,7 +460,7 @@ class Regeneration implements Serializable { ENABLE_TESTDYNAMICPARALLEL: DEFAULTS_JSON['testDetails']['enableTestDynamicParallel'] as Boolean, ENABLE_INSTALLERS: true, ENABLE_SIGNER: true, - CLEAN_WORKSPACE: true, + CLEAN_WORKSPACE_BEFORE: true, CLEAN_WORKSPACE_AFTER: true, CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER: false ) diff --git a/pipelines/build/common/create_job_from_template.groovy b/pipelines/build/common/create_job_from_template.groovy index 4ca777508..d93880feb 100644 --- a/pipelines/build/common/create_job_from_template.groovy +++ b/pipelines/build/common/create_job_from_template.groovy @@ -121,7 +121,7 @@ pipelineJob("$buildFolder/$JOB_NAME") {
ENABLE_TESTDYNAMICPARALLEL
Run parallel
ENABLE_INSTALLERS
Run installers
ENABLE_SIGNER
Run signer
-
CLEAN_WORKSPACE
Wipe out workspace before build
+
CLEAN_WORKSPACE_BEFORE
Wipe out workspace before build
CLEAN_WORKSPACE_AFTER
Wipe out workspace after build
CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER
Wipe out workspace build output only, after build
diff --git a/pipelines/build/common/openjdk_build_pipeline.groovy b/pipelines/build/common/openjdk_build_pipeline.groovy index 9b28fb564..bdc0d97f5 100644 --- a/pipelines/build/common/openjdk_build_pipeline.groovy +++ b/pipelines/build/common/openjdk_build_pipeline.groovy @@ -1196,7 +1196,7 @@ class Build { Once the build completes, it will calculate its version output, commit the first metadata writeout, and archive the build results. */ def buildScripts( - cleanWorkspace, + cleanWorkspaceBefore, cleanWorkspaceAfter, cleanWorkspaceBuildOutputAfter, filename, @@ -1206,7 +1206,7 @@ class Build { // Create the repo handler with the user's defaults to ensure a temurin-build checkout is not null def repoHandler = new RepoHandler(USER_REMOTE_CONFIGS) repoHandler.setUserDefaultsJson(context, DEFAULTS_JSON['defaultsUrl']) - if (cleanWorkspace) { + if (cleanWorkspaceBefore) { try { try { context.timeout(time: buildTimeouts.NODE_CLEAN_TIMEOUT, unit: 'HOURS') { @@ -1546,7 +1546,7 @@ class Build { def enableInstallers = Boolean.valueOf(buildConfig.ENABLE_INSTALLERS) def enableSigner = Boolean.valueOf(buildConfig.ENABLE_SIGNER) def useAdoptShellScripts = Boolean.valueOf(buildConfig.USE_ADOPT_SHELL_SCRIPTS) - def cleanWorkspace = Boolean.valueOf(buildConfig.CLEAN_WORKSPACE) + def cleanWorkspaceBefore = Boolean.valueOf(buildConfig.CLEAN_WORKSPACE_BEFORE) def cleanWorkspaceAfter = Boolean.valueOf(buildConfig.CLEAN_WORKSPACE_AFTER) def cleanWorkspaceBuildOutputAfter = Boolean.valueOf(buildConfig.CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER) @@ -1577,17 +1577,17 @@ class Build { context.node(label) { addNodeToBuildDescription() // Cannot clean workspace from inside docker container - if (cleanWorkspace) { + if (cleanWorkspaceBefore) { try { context.timeout(time: buildTimeouts.CONTROLLER_CLEAN_TIMEOUT, unit: 'HOURS') { // Cannot clean workspace from inside docker container - if (cleanWorkspace) { + if (cleanWorkspaceBefore) { try { context.cleanWs notFailBuild: true } catch (e) { context.println "Failed to clean ${e}" } - cleanWorkspace = false + cleanWorkspaceBefore = false } } } catch (FlowInterruptedException e) { @@ -1642,7 +1642,7 @@ class Build { context.docker.build('build-image', "--build-arg image=${buildConfig.DOCKER_IMAGE} -f ${buildConfig.DOCKER_FILE} .").inside(buildConfig.DOCKER_ARGS) { buildScripts( - cleanWorkspace, + cleanWorkspaceBefore, cleanWorkspaceAfter, cleanWorkspaceBuildOutputAfter, filename, @@ -1652,7 +1652,7 @@ class Build { } else { context.docker.image(buildConfig.DOCKER_IMAGE).inside(buildConfig.DOCKER_ARGS) { buildScripts( - cleanWorkspace, + cleanWorkspaceBefore, cleanWorkspaceAfter, cleanWorkspaceBuildOutputAfter, filename, @@ -1680,7 +1680,7 @@ class Build { context.echo("changing ${workspace}") context.ws(workspace) { buildScripts( - cleanWorkspace, + cleanWorkspaceBefore, cleanWorkspaceAfter, cleanWorkspaceBuildOutputAfter, filename, @@ -1689,7 +1689,7 @@ class Build { } } else { buildScripts( - cleanWorkspace, + cleanWorkspaceBefore, cleanWorkspaceAfter, cleanWorkspaceBuildOutputAfter, filename, diff --git a/pipelines/build/openjdk_pipeline.groovy b/pipelines/build/openjdk_pipeline.groovy index ee8f875ec..229aa83ef 100644 --- a/pipelines/build/openjdk_pipeline.groovy +++ b/pipelines/build/openjdk_pipeline.groovy @@ -123,7 +123,7 @@ if (scmVars != null || configureBuild != null || buildConfigurations != null) { aqaReference, aqaAutoGen, overridePublishName, - useAdoptBashScripts, + useAdoptShellScripts, additionalConfigureArgs, scmVars, additionalBuildArgs, diff --git a/pipelines/jobs/pipeline_job_template.groovy b/pipelines/jobs/pipeline_job_template.groovy index 51ee35a97..7cd2e64d6 100644 --- a/pipelines/jobs/pipeline_job_template.groovy +++ b/pipelines/jobs/pipeline_job_template.groovy @@ -104,7 +104,7 @@ pipelineJob("${BUILD_FOLDER}/${JOB_NAME}") { stringParam('additionalConfigureArgs', '', "Additional arguments that will be ultimately passed to OpenJDK's ./configure") stringParam('additionalBuildArgs', '', 'Additional arguments to be passed to makejdk-any-platform.sh') stringParam('overrideFileNameVersion', '', "When forming the filename, ignore the part of the filename derived from the publishName or timestamp and override it.
For instance if you set this to 'FOO' the final file name will be of the form: OpenJDK8U-jre_ppc64le_linux_openj9_FOO.tar.gz") - booleanParam('useAdoptBashScripts', adoptScripts, "If enabled, the downstream job will pull and execute make-adopt-build-farm.sh from adoptium/temurin-build. If disabled, it will use whatever the job is running inside of at the time, usually it's the default repository in the configuration.") + booleanParam('useAdoptShellScripts', adoptScripts, "If enabled, the downstream job will pull and execute make-adopt-build-farm.sh from adoptium/temurin-build. If disabled, it will use whatever the job is running inside of at the time, usually it's the default repository in the configuration.") booleanParam('cleanWorkspaceBeforeBuild', false, 'Clean out the workspace before the build') booleanParam('cleanWorkspaceAfterBuild', false, 'Clean out the workspace after the build') booleanParam('cleanWorkspaceBuildOutputAfterBuild', cleanWsBuildOutput, 'Clean out the workspace/build/src/build and workspace/target output only, after the build') diff --git a/pipelines/src/test/groovy/IndividualBuildConfigTest.groovy b/pipelines/src/test/groovy/IndividualBuildConfigTest.groovy index b46a4cb98..875bf05e1 100644 --- a/pipelines/src/test/groovy/IndividualBuildConfigTest.groovy +++ b/pipelines/src/test/groovy/IndividualBuildConfigTest.groovy @@ -45,7 +45,7 @@ class IndividualBuildConfigTest { ENABLE_TESTS : true, ENABLE_INSTALLERS : true, ENABLE_SIGNER : true, - CLEAN_WORKSPACE : false, + CLEAN_WORKSPACE_BEFORE : false, CLEAN_WORKSPACE_AFTER : false, CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER : false ])