@@ -10,7 +10,21 @@ create_badge() {
10
10
}
11
11
12
12
arc_registry_push () {
13
- :
13
+ if [ -z " $arc_registry_endpoint " ] || [ -z " $arc_registry_token " ]; then
14
+ echo " ARC Registry endpoint or token not configured. Skipping..."
15
+ return
16
+ fi
17
+ user_email=" $( jq -r ' .commit.author.email // empty' <<< " $json" ) "
18
+ if [ -z " $user_email " ]; then
19
+ echo " Failed to find email of commit for the pipeline... continuing."
20
+ fi
21
+ ret=" $( curl -k -L -X POST \
22
+ -H " Content-Type: application/json" \
23
+ -H " X-Gitlab-Token: $arc_registry_token " \
24
+ -d " $json " \
25
+ " $arc_registry_endpoint "
26
+ ) "
27
+ echo " ARC registry push returned: $ret "
14
28
}
15
29
16
30
get_publication_link () {
@@ -124,21 +138,10 @@ if [ "$event_type" = "pipeline" ]; then
124
138
exit 1
125
139
fi
126
140
127
- # # BLOCK GAJENDRA
128
- user_email=" $( jq -r ' .commit.author.email // empty' <<< " $json" ) "
129
- if [ -z " $user_email " ]; then
130
- echo " Failed to find email of commit for the pipeline... continuing."
131
- fi
132
- if [ " $event_ref " = " $arc_badges_branch_name " ]; then
133
- ret=" $( curl -k -L -X POST \
134
- -H " Content-Type: application/json" \
135
- -H " X-Gitlab-Token: $arc_registry_token " \
136
- -d " $json " \
137
- " $arc_registry_endpoint "
138
- ) "
139
- echo " GAJ: $ret "
141
+ if [ " $event_ref " = " main" ] || [ " $event_ref " = " master" ]; then
142
+ echo " Pushing event to the ARC registry...."
143
+ arc_registry_push
140
144
fi
141
- # # END BLOCK GAJENDRA
142
145
143
146
# # BLOCK CHECK CQC BRANCH
144
147
ret=" $( curl -k -L -o /dev/null -s -w " %{http_code}" \
0 commit comments