Skip to content

Commit

Permalink
Abort render-pipeline when we get a null catalog URL
Browse files Browse the repository at this point in the history
Abort `render-pipeline` script when Lieutenant API returns no catalog
URL for a cluster. This makes the failure mode more obvious than
unexpected failing compile jobs for some clusters (usually with an error
like "fatal: unable to access '<catalog repo>': The requested URL
returned error: 403".
simu committed Jan 28, 2025
1 parent d79a32e commit e4594c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gitlab/bin/step-render-pipeline
Original file line number Diff line number Diff line change
@@ -4,6 +4,10 @@ set -e -u -x
cluster_catalog_urls=""
for c in ${CLUSTERS}; do
r=$(curl -sH"Authorization: Bearer ${COMMODORE_API_TOKEN}" "${COMMODORE_API_URL}/clusters/${c}" | jq -r .gitRepo.url)
if [ "$r" = "null" ]; then
echo "Got 'null' for catalog URL fo cluster ${c}, aborting..."
exit 1
fi
cluster_catalog_urls="${cluster_catalog_urls}${c}=${r} "
done

0 comments on commit e4594c8

Please sign in to comment.