Skip to content

Commit

Permalink
Add bwc.checkout.align parameter support in gradle-check (#4811)
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Singh <[email protected]>
  • Loading branch information
rishabh6788 authored Jul 1, 2024
1 parent 2bbf008 commit 3328263
Showing 1 changed file with 8 additions and 4 deletions.
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"
}

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

0 comments on commit 3328263

Please sign in to comment.