Skip to content

Commit

Permalink
Merge #5736
Browse files Browse the repository at this point in the history
5736: Set commit status from Jenkins also for special branches  r=hkaiser a=msimberg

`@hkaiser` this is required if you decide to try to use bors more extensively. Otherwise it's not necessary and can be closed without merging.

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>
  • Loading branch information
StellarBot and msimberg committed Jan 18, 2022
2 parents 42bd987 + 4a8eab7 commit 3a001a9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
17 changes: 13 additions & 4 deletions .jenkins/cscs/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,22 @@ else
github_commit_status="failure"
fi

if [[ -n "${ghprbPullId:-}" ]]; then
# Get the CDash dashboard build id
cdash_build_id="$(cat jenkins-hpx-${configuration_name_with_build_type}-cdash-build-id.txt)"

if [[ -z "${ghprbPullId:-}" ]]; then
.jenkins/common/set_github_status.sh \
"${GITHUB_TOKEN}" \
"STEllAR-GROUP/hpx" \
"${GIT_COMMIT}" \
"${github_commit_status}" \
"${configuration_name_with_build_type}" \
"${cdash_build_id}" \
"jenkins/cscs"
else
# Extract just the organization and repo names "org/repo" from the full URL
github_commit_repo="$(echo $ghprbPullLink | sed -n 's/https:\/\/github.com\/\(.*\)\/pull\/[0-9]*/\1/p')"

# Get the CDash dashboard build id
cdash_build_id="$(cat jenkins-hpx-${configuration_name_with_build_type}-cdash-build-id.txt)"

# Set GitHub status with CDash url
.jenkins/common/set_github_status.sh \
"${GITHUB_TOKEN}" \
Expand Down
17 changes: 13 additions & 4 deletions .jenkins/lsu/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,22 @@ else
github_commit_status="failure"
fi

if [[ -n "${ghprbPullId:-}" ]]; then
# Get the CDash dashboard build id
cdash_build_id="$(cat jenkins-hpx-${configuration_name_with_build_type}-cdash-build-id.txt)"

if [[ -z "${ghprbPullId:-}" ]]; then
.jenkins/common/set_github_status.sh \
"${GITHUB_TOKEN}" \
"STEllAR-GROUP/hpx" \
"${GIT_COMMIT}" \
"${github_commit_status}" \
"${configuration_name_with_build_type}" \
"${cdash_build_id}" \
"jenkins/lsu"
else
# Extract just the organization and repo names "org/repo" from the full URL
github_commit_repo="$(echo $ghprbPullLink | sed -n 's/https:\/\/github.com\/\(.*\)\/pull\/[0-9]*/\1/p')"

# Get the CDash dashboard build id
cdash_build_id="$(cat jenkins-hpx-${configuration_name_with_build_type}-cdash-build-id.txt)"

# Set GitHub status with CDash url
.jenkins/common/set_github_status.sh \
"${GITHUB_TOKEN}" \
Expand Down

0 comments on commit 3a001a9

Please sign in to comment.