From 48bc696c644ee6d0ce61ee8cd800982ae6f617f2 Mon Sep 17 00:00:00 2001 From: sakshi1215 Date: Mon, 10 Oct 2022 17:10:57 +0530 Subject: [PATCH 1/4] fix: rename argument parameters Signed-off-by: sakshi1215 --- pipelines/build/common/build_base_file.groovy | 2 +- pipelines/build/common/config_regeneration.groovy | 2 +- pipelines/build/common/create_job_from_template.groovy | 2 +- pipelines/build/common/openjdk_build_pipeline.groovy | 2 +- pipelines/build/openjdk_pipeline.groovy | 2 +- pipelines/jobs/pipeline_job_template.groovy | 2 +- pipelines/src/test/groovy/IndividualBuildConfigTest.groovy | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pipelines/build/common/build_base_file.groovy b/pipelines/build/common/build_base_file.groovy index 890408eb7..5fed87856 100644 --- a/pipelines/build/common/build_base_file.groovy +++ b/pipelines/build/common/build_base_file.groovy @@ -181,7 +181,7 @@ class Builder implements Serializable { ENABLE_TESTDYNAMICPARALLEL: enableTestDynamicParallel, ENABLE_INSTALLERS: enableInstallers, ENABLE_SIGNER: enableSigner, - CLEAN_WORKSPACE: cleanWorkspace, + CLEAN_WORKSPACE_BEFORE_BUILD: cleanWorkspaceBeforeBuild, CLEAN_WORKSPACE_AFTER: cleanWsAfter, 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..025fbe591 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_BUILD: 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..8cbcff22e 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_BUILD
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..2d6f619bf 100644 --- a/pipelines/build/common/openjdk_build_pipeline.groovy +++ b/pipelines/build/common/openjdk_build_pipeline.groovy @@ -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 cleanWorkspace = Boolean.valueOf(buildConfig.CLEAN_WORKSPACE_BEFORE_BUILD) def cleanWorkspaceAfter = Boolean.valueOf(buildConfig.CLEAN_WORKSPACE_AFTER) def cleanWorkspaceBuildOutputAfter = Boolean.valueOf(buildConfig.CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER) 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..c22f767a9 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_BUILD : false, CLEAN_WORKSPACE_AFTER : false, CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER : false ]) From c2bce69490c3e21ef1833a95a4fd839a14b956b9 Mon Sep 17 00:00:00 2001 From: sakshi1215 Date: Tue, 11 Oct 2022 09:44:49 +0530 Subject: [PATCH 2/4] renamne Signed-off-by: sakshi1215 --- pipelines/build/common/build_base_file.groovy | 2 +- .../build/common/config_regeneration.groovy | 2 +- .../common/create_job_from_template.groovy | 2 +- .../common/openjdk_build_pipeline.groovy | 20 +++++++++---------- .../groovy/IndividualBuildConfigTest.groovy | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pipelines/build/common/build_base_file.groovy b/pipelines/build/common/build_base_file.groovy index 5fed87856..fcfa2edb8 100644 --- a/pipelines/build/common/build_base_file.groovy +++ b/pipelines/build/common/build_base_file.groovy @@ -181,7 +181,7 @@ class Builder implements Serializable { ENABLE_TESTDYNAMICPARALLEL: enableTestDynamicParallel, ENABLE_INSTALLERS: enableInstallers, ENABLE_SIGNER: enableSigner, - CLEAN_WORKSPACE_BEFORE_BUILD: cleanWorkspaceBeforeBuild, + CLEAN_WORKSPACE_BEFORE: cleanWorkspaceBefore, CLEAN_WORKSPACE_AFTER: cleanWsAfter, CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER: cleanWorkspaceBuildOutputAfterBuild ) diff --git a/pipelines/build/common/config_regeneration.groovy b/pipelines/build/common/config_regeneration.groovy index 025fbe591..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_BEFORE_BUILD: 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 8cbcff22e..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_BEFORE_BUILD
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 2d6f619bf..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_BEFORE_BUILD) + 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/src/test/groovy/IndividualBuildConfigTest.groovy b/pipelines/src/test/groovy/IndividualBuildConfigTest.groovy index c22f767a9..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_BEFORE_BUILD : false, + CLEAN_WORKSPACE_BEFORE : false, CLEAN_WORKSPACE_AFTER : false, CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER : false ]) From 517b81be58a96334e9fba82560f188ebfbf50078 Mon Sep 17 00:00:00 2001 From: Sakshi Patle <55292176+sakshi1215@users.noreply.github.com> Date: Tue, 11 Oct 2022 15:02:08 +0530 Subject: [PATCH 3/4] Update build_base_file.groovy --- pipelines/build/common/build_base_file.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/build/common/build_base_file.groovy b/pipelines/build/common/build_base_file.groovy index fcfa2edb8..6dc14bda6 100644 --- a/pipelines/build/common/build_base_file.groovy +++ b/pipelines/build/common/build_base_file.groovy @@ -131,9 +131,9 @@ 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 From 055d391c1bb2042057fbdeef306098529edd738e Mon Sep 17 00:00:00 2001 From: Sakshi Patle <55292176+sakshi1215@users.noreply.github.com> Date: Wed, 12 Oct 2022 18:59:22 +0530 Subject: [PATCH 4/4] Update build_base_file.groovy --- pipelines/build/common/build_base_file.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pipelines/build/common/build_base_file.groovy b/pipelines/build/common/build_base_file.groovy index 6dc14bda6..58299d5db 100644 --- a/pipelines/build/common/build_base_file.groovy +++ b/pipelines/build/common/build_base_file.groovy @@ -136,10 +136,10 @@ class Builder implements Serializable { cleanWorkspaceBefore = true } - def cleanWsAfter = cleanWorkspaceAfterBuild + def cleanWorkspaceAfter = cleanWorkspaceAfterBuild if (platformCleanWorkspaceAfterBuild) { // Platform override specified - cleanWsAfter = platformCleanWorkspaceAfterBuild + cleanWorkspaceAfter = platformCleanWorkspaceAfterBuild } return new IndividualBuildConfig( @@ -182,7 +182,7 @@ class Builder implements Serializable { ENABLE_INSTALLERS: enableInstallers, ENABLE_SIGNER: enableSigner, CLEAN_WORKSPACE_BEFORE: cleanWorkspaceBefore, - CLEAN_WORKSPACE_AFTER: cleanWsAfter, + CLEAN_WORKSPACE_AFTER: cleanWorkspaceAfter, CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER: cleanWorkspaceBuildOutputAfterBuild ) }