Skip to content

Commit

Permalink
add support for old master branches for badges
Browse files Browse the repository at this point in the history
  • Loading branch information
j-bauer committed Mar 27, 2024
1 parent ce1860f commit b5296f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions misc/datahub-hooks.bash
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ if [ "$event_type" = "pipeline" ]; then
exit 1
fi

if [ "$event_ref" = "main" ] || [ "$event_ref" = "master" ]; then
if [ "$event_ref" = "$arc_badges_branch_name" ] || [ "$event_ref" = "master" ]; then
echo "Pushing event to the ARC registry...."
arc_registry_push
fi
Expand Down Expand Up @@ -170,6 +170,7 @@ if [ "$event_type" = "pipeline" ]; then
## END BLOCK CHECK CQC

[ "$event_ref" = "$arc_badges_branch_name" ] && purge_badges
[ "$event_ref" = "master" ] && purge_badges

## BLOCK COMMIT ARTIFACTS TO $arc_quality_control_branch_name
commit_id="$(jq -r '.commit.id // empty' <<< "$json")"
Expand Down Expand Up @@ -238,7 +239,7 @@ if [ "$event_type" = "pipeline" ]; then
## BLOCK BADGES ONLY
# check for svg suffix and only for the configured branch for badges
[ "$file" = "${file%.svg}" ] && continue
[ "$event_ref" != "$arc_badges_branch_name" ] && continue
! ( [ "$event_ref" != "$arc_badges_branch_name" ] || [ "$event_ref" != "master" ] ) && continue

badge_name="validation-$(echo -n ${file%%@*} | tr '/' '-')"
echo "badge name: $badge_name"
Expand Down

0 comments on commit b5296f3

Please sign in to comment.