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

fix: rename argument parameters #440

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions pipelines/build/common/build_base_file.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
zdtsw marked this conversation as resolved.
Show resolved Hide resolved
karianna marked this conversation as resolved.
Show resolved Hide resolved
CLEAN_WORKSPACE_AFTER: cleanWorkspaceAfter,
CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER: cleanWorkspaceBuildOutputAfterBuild
)
}
Expand Down
2 changes: 1 addition & 1 deletion pipelines/build/common/config_regeneration.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion pipelines/build/common/create_job_from_template.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pipelineJob("$buildFolder/$JOB_NAME") {
<dt><strong>ENABLE_TESTDYNAMICPARALLEL</strong></dt><dd>Run parallel</dd>
<dt><strong>ENABLE_INSTALLERS</strong></dt><dd>Run installers</dd>
<dt><strong>ENABLE_SIGNER</strong></dt><dd>Run signer</dd>
<dt><strong>CLEAN_WORKSPACE</strong></dt><dd>Wipe out workspace before build</dd>
<dt><strong>CLEAN_WORKSPACE_BEFORE</strong></dt><dd>Wipe out workspace before build</dd>
<dt><strong>CLEAN_WORKSPACE_AFTER</strong></dt><dd>Wipe out workspace after build</dd>
<dt><strong>CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER</strong></dt><dd>Wipe out workspace build output only, after build</dd>
</dl>
Expand Down
20 changes: 10 additions & 10 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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') {
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand All @@ -1652,7 +1652,7 @@ class Build {
} else {
context.docker.image(buildConfig.DOCKER_IMAGE).inside(buildConfig.DOCKER_ARGS) {
buildScripts(
cleanWorkspace,
cleanWorkspaceBefore,
cleanWorkspaceAfter,
cleanWorkspaceBuildOutputAfter,
filename,
Expand Down Expand Up @@ -1680,7 +1680,7 @@ class Build {
context.echo("changing ${workspace}")
context.ws(workspace) {
buildScripts(
cleanWorkspace,
cleanWorkspaceBefore,
cleanWorkspaceAfter,
cleanWorkspaceBuildOutputAfter,
filename,
Expand All @@ -1689,7 +1689,7 @@ class Build {
}
} else {
buildScripts(
cleanWorkspace,
cleanWorkspaceBefore,
cleanWorkspaceAfter,
cleanWorkspaceBuildOutputAfter,
filename,
Expand Down
2 changes: 1 addition & 1 deletion pipelines/build/openjdk_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ if (scmVars != null || configureBuild != null || buildConfigurations != null) {
aqaReference,
aqaAutoGen,
overridePublishName,
useAdoptBashScripts,
useAdoptShellScripts,
additionalConfigureArgs,
scmVars,
additionalBuildArgs,
Expand Down
2 changes: 1 addition & 1 deletion pipelines/jobs/pipeline_job_template.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pipelineJob("${BUILD_FOLDER}/${JOB_NAME}") {
stringParam('additionalConfigureArgs', '', "Additional arguments that will be ultimately passed to OpenJDK's <code>./configure</code>")
stringParam('additionalBuildArgs', '', 'Additional arguments to be passed to <code>makejdk-any-platform.sh</code>')
stringParam('overrideFileNameVersion', '', "When forming the filename, ignore the part of the filename derived from the publishName or timestamp and override it.<br/>For instance if you set this to 'FOO' the final file name will be of the form: <code>OpenJDK8U-jre_ppc64le_linux_openj9_FOO.tar.gz</code>")
booleanParam('useAdoptBashScripts', adoptScripts, "If enabled, the downstream job will pull and execute <code>make-adopt-build-farm.sh</code> 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 <code>make-adopt-build-farm.sh</code> 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')
Expand Down
2 changes: 1 addition & 1 deletion pipelines/src/test/groovy/IndividualBuildConfigTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
])
Expand Down