From 58cde2fd1d7f378417d813abb63c2134175335ca Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Tue, 3 Dec 2024 10:19:18 -0800 Subject: [PATCH] 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 --- .ci/community-jenkins/Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.ci/community-jenkins/Jenkinsfile b/.ci/community-jenkins/Jenkinsfile index 791fec240f2..87129d3de26 100644 --- a/.ci/community-jenkins/Jenkinsfile +++ b/.ci/community-jenkins/Jenkinsfile @@ -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 Open MPI PR #${CHANGE_ID}" +if (env.CHANGE_URL) { + currentBuild.description = "This is a build of Open MPI PR #${CHANGE_ID}" +} else { + currentBuild.description = "Build of ${BRANCH_NAME}" +} check_stages = prepare_check_stages() println("Initialized Pipeline")