Skip to content

Commit 58cde2f

Browse files
committed
ci: Fix build of branch commits
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]>
1 parent e5cc709 commit 58cde2f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.ci/community-jenkins/Jenkinsfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ milestone(buildNumber)
3535
// back to the PR. The "Details" link at the bottom of the GitHub PR page brings
3636
// you to the Jenkins Build page, so we're adding the link back to the GitHub PR
3737
// page.
38-
currentBuild.description = "This is a build of <a href=\"${CHANGE_URL}\"}\">Open MPI PR #${CHANGE_ID}</a>"
38+
if (env.CHANGE_URL) {
39+
currentBuild.description = "This is a build of <a href=\"${CHANGE_URL}\"}\">Open MPI PR #${CHANGE_ID}</a>"
40+
} else {
41+
currentBuild.description = "Build of ${BRANCH_NAME}"
42+
}
3943

4044
check_stages = prepare_check_stages()
4145
println("Initialized Pipeline")

0 commit comments

Comments
 (0)