Skip to content

Commit

Permalink
Add handling of push events on gradle check
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Jul 7, 2022
1 parent 3193a91 commit e16bc25
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions jenkins/gradle/gradle-check.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,13 @@ pipeline {
sh("ls /var/jenkins/tools/hudson.model.JDK/")
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 PR: ${pr_url}")
currentBuild.description = """<a href="${pr_url}">PR #${pr_number}</a>: ${pr_title}"""
println("Triggered by GitHub: ${pr_to_clone_url}")
if ("$pr_number" == "Null") {
currentBuild.description = """<a href="${pr_to_clone_url}">Others</a>: ${pr_title}"""
}
else {
currentBuild.description = """<a href="${pr_url}">PR #${pr_number}</a>: ${pr_title}"""
}

runGradleCheck(
gitRepoUrl: "${pr_from_clone_url}",
Expand Down

0 comments on commit e16bc25

Please sign in to comment.