diff --git a/jenkins/gradle/gradle-check.jenkinsfile b/jenkins/gradle/gradle-check.jenkinsfile index f0a30dde5a..94d60dc306 100644 --- a/jenkins/gradle/gradle-check.jenkinsfile +++ b/jenkins/gradle/gradle-check.jenkinsfile @@ -89,14 +89,16 @@ pipeline { fi """ + def agent_name = params.AGENT_LABEL.tokenize('-')[2] + if (env.USER_BUILD_CAUSE.equals('[]') && env.TIMER_BUILD_CAUSE.equals('[]')) { def pr_url = "${pr_to_clone_url}".replace(".git", "/pull/${pr_number}") println("Triggered by GitHub: ${pr_to_clone_url}") if ("$pr_number" == "Null") { - currentBuild.description = """Others: ${pr_title}
runner: ${AGENT_LABEL}""" + currentBuild.description = """runner: ${agent_name}
Others: ${pr_title}""" } else { - currentBuild.description = """PR #${pr_number}: ${pr_title}
runner: ${AGENT_LABEL}""" + currentBuild.description = """runner: ${agent_name}
PR #${pr_number}: ${pr_title}""" } runGradleCheck( @@ -107,7 +109,7 @@ pipeline { else { println("Triggered by User or Triggered by Timer") def repo_url = "${GIT_REPO_URL}".replace(".git", "/commit") - currentBuild.description = """git: ${GIT_REPO_URL}
ref: ${GIT_REFERENCE}
runner: ${AGENT_LABEL}""" + currentBuild.description = """runner: ${agent_name}
git: ${GIT_REPO_URL}
ref: ${GIT_REFERENCE}""" runGradleCheck( gitRepoUrl: "${GIT_REPO_URL}", diff --git a/jenkins/opensearch-dashboards/distribution-build.jenkinsfile b/jenkins/opensearch-dashboards/distribution-build.jenkinsfile index 14498bcf9f..849f392d44 100644 --- a/jenkins/opensearch-dashboards/distribution-build.jenkinsfile +++ b/jenkins/opensearch-dashboards/distribution-build.jenkinsfile @@ -52,6 +52,11 @@ pipeline { description: 'Build docker image or not with options.', choices: ['build_docker', 'build_docker_with_build_number_tag', 'do_not_build_docker'], ) + booleanParam( + name: 'UPDATE_LATEST_URL', + description: 'Update latest url so /latest/ is pointed to this build', + defaultValue: true + ) booleanParam( name: 'PUBLISH_NOTIFICATION', description: 'Publish the status of this build job or not.', @@ -614,9 +619,11 @@ pipeline { } steps { script { - uploadIndexFile( - indexFilePath: env.INDEX_FILE_PATH - ) + if (params.UPDATE_LATEST_URL) { + uploadIndexFile( + indexFilePath: env.INDEX_FILE_PATH + ) + } } } } diff --git a/jenkins/opensearch/distribution-build.jenkinsfile b/jenkins/opensearch/distribution-build.jenkinsfile index 33a651358c..a682c8d727 100644 --- a/jenkins/opensearch/distribution-build.jenkinsfile +++ b/jenkins/opensearch/distribution-build.jenkinsfile @@ -52,6 +52,11 @@ pipeline { description: 'Build docker image or not with options.', choices: ['build_docker', 'build_docker_with_build_number_tag', 'do_not_build_docker'], ) + booleanParam( + name: 'UPDATE_LATEST_URL', + description: 'Update latest url so /latest/ is pointed to this build', + defaultValue: true + ) booleanParam( name: 'PUBLISH_NOTIFICATION', description: 'Publish the status of this build job or not.', @@ -786,9 +791,11 @@ pipeline { } steps { script { - uploadIndexFile( - indexFilePath: env.INDEX_FILE_PATH - ) + if (params.UPDATE_LATEST_URL) { + uploadIndexFile( + indexFilePath: env.INDEX_FILE_PATH + ) + } } } }