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

Add bwc.checkout.align parameter support in gradle-check #4811

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions jenkins/gradle/gradle-check.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* compatible open source license.
*/

lib = library(identifier: 'jenkins@6.5.0', retriever: modernSCM([
lib = library(identifier: 'jenkins@6.6.0', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand Down Expand Up @@ -107,6 +107,7 @@ pipeline {

echo("Build Cause: ${BUILD_CAUSE}")
withCredentials([usernamePassword(credentialsId: CREDENTIAL_ID, usernameVariable: 'DOCKER_USERNAME', passwordVariable: 'DOCKER_PASSWORD')]) {
def bwc_checkout_align = "false"

def dockerLogin = sh(returnStdout: true, script: "set +x && (echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin) || echo docker error").trim()

Expand All @@ -117,12 +118,14 @@ pipeline {
currentBuild.description = """runner: ${agent_name}<br><a href="${pr_to_clone_url}">Others</a>: ${pr_title}"""
}
else {
currentBuild.description = """runner: ${agent_name}<br><a href="${pr_url}">PR #${pr_number}</a>: ${pr_title}"""
currentBuild.description = """runner: ${agent_name}<br><a href="${pr_url}">PR #${pr_number}</a>: ${pr_title} with bwc.checkout.align=true"""
bwc_checkout_align = "true"
Copy link
Member

Choose a reason for hiding this comment

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

Suggest adding the bwc checkout align value in description as well.

}

runGradleCheck(
gitRepoUrl: "${pr_from_clone_url}",
gitReference: "${pr_from_sha}"
gitReference: "${pr_from_sha}",
bwcCheckoutAlign: "${bwc_checkout_align}"
)
}
else {
Expand All @@ -132,7 +135,8 @@ pipeline {

runGradleCheck(
gitRepoUrl: "${GIT_REPO_URL}",
gitReference: "${GIT_REFERENCE}"
gitReference: "${GIT_REFERENCE}",
bwcCheckoutAlign: "${bwc_checkout_align}"
)
}

Expand Down
Loading