Skip to content

Commit

Permalink
ci: Fix build of branch commits
Browse files Browse the repository at this point in the history
The community Jenkins jenkinsfile is evaluated both on each PR and
for each commit to one of the branches in the openmpi/ompi repository.
The builds for the commit checks were broken because of a bug in the
description setting code, that assumed every invocation was for a PR.
This commit fixes that by differentiating the type of build before
setting the description.

Signed-off-by: Brian Barrett <[email protected]>
  • Loading branch information
bwbarrett committed Dec 3, 2024
1 parent e5cc709 commit 58cde2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .ci/community-jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ milestone(buildNumber)
// back to the PR. The "Details" link at the bottom of the GitHub PR page brings
// you to the Jenkins Build page, so we're adding the link back to the GitHub PR
// page.
currentBuild.description = "This is a build of <a href=\"${CHANGE_URL}\"}\">Open MPI PR #${CHANGE_ID}</a>"
if (env.CHANGE_URL) {
currentBuild.description = "This is a build of <a href=\"${CHANGE_URL}\"}\">Open MPI PR #${CHANGE_ID}</a>"
} else {
currentBuild.description = "Build of ${BRANCH_NAME}"
}

check_stages = prepare_check_stages()
println("Initialized Pipeline")
Expand Down

0 comments on commit 58cde2f

Please sign in to comment.