Skip to content

Commit 4e40776

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]> (cherry picked from commit 58cde2f)
1 parent d1bb190 commit 4e40776

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
@@ -34,7 +34,11 @@ milestone(buildNumber)
3434
// back to the PR. The "Details" link at the bottom of the GitHub PR page brings
3535
// you to the Jenkins Build page, so we're adding the link back to the GitHub PR
3636
// page.
37-
currentBuild.description = "This is a build of <a href=\"${CHANGE_URL}\"}\">Open MPI PR #${CHANGE_ID}</a>"
37+
if (env.CHANGE_URL) {
38+
currentBuild.description = "This is a build of <a href=\"${CHANGE_URL}\"}\">Open MPI PR #${CHANGE_ID}</a>"
39+
} else {
40+
currentBuild.description = "Build of ${BRANCH_NAME}"
41+
}
3842

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

0 commit comments

Comments
 (0)