Commit 907abe97 authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

Merge branch 'rhtenhove-beta-patch-69817' into 'beta'

ci: remove confusing single quotes

See merge request just-ci/templates!33
parents c2bffa4c 15a35401
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -29,13 +29,14 @@
    - mkdir -p ci_badges
    - anybadge -l "${NAME}" -v "${VALUE}" -c "${COLOR}" -f "ci_badges/${NAME}.svg"
    - |
      echo -e "[+] Created 'ci_badges/${NAME}.svg':\n- Label: '${NAME}'\n- Value: '${VALUE}'\n- Color: '${COLOR}'\n- URL: '${URL}'"
      echo -e "[+] Created ci_badges/${NAME}.svg:\n- Label: ${NAME}\n- Value: ${VALUE}\n- Color: ${COLOR}\n- URL: ${URL}"

    - |
      if [ -z "${GL_TOKEN}" ]; then
        echo "[!] GL_TOKEN not set. You can check the badge in the artifacts. It will not be automatically installed/updated in your project."
        echo "[?] You can set it manually. Create/update a badge named '${NAME}' with the image URL '${IMAGE_URL}' and as the link URL '${URL:-$CI_PROJECT_URL}'."
        echo "[?] You can also set this badge anywhere else. Just reference the image '${IMAGE_URL}'."
        echo "[?] You can set it manually. Create/update a badge named '${NAME}' with the image URL ${IMAGE_URL} and as the link URL ${URL:-$CI_PROJECT_URL}."
        echo "[?] You can also set this badge anywhere else. Just reference the image ${IMAGE_URL}."
        exit 1
      else
        echo "[*] Creating/updating badge..."
        BADGE_ID=$(curl -SsLf -H "PRIVATE-TOKEN: ${GL_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/badges" | jq --arg NAME "${NAME}" '.[] | select(.name==$NAME) | .id') || true