Skip to content
Snippets Groups Projects
Verified Commit f0c7c7e7 authored by Kristian Klausen's avatar Kristian Klausen :tada:
Browse files

Setup issue-bot[1] for reporting failed pipelines

This way, there is a chance that I will notice immediately if the
pipelines fail, rather than randomly noticing it later.

[1] https://gitlab.com/gitlab-org/distribution/issue-bot

Fix #163
parent f0ae2d4b
No related branches found
No related tags found
No related merge requests found
Pipeline #110978 passed
......@@ -7,6 +7,7 @@ stages:
- test
- publish
- cleanup
- report
shellcheck:
stage: lint
......@@ -209,3 +210,14 @@ cleanup:
for id in $(curl --silent --fail --show-error "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages?per_page=100&order_by=created_at&sort=asc" | jq '.[] | select(.created_at | split("T")[0] | . < (now-60*60*24*90|strflocaltime("%Y-%m-%d"))) | .id'); do
curl --silent --fail --show-error --request DELETE --header "JOB-TOKEN: ${CI_JOB_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/${id}"
done
issue-bot:
stage: report
tags:
- secure
- docker
image: registry.gitlab.com/gitlab-org/distribution/issue-bot:latest
script: /issue-bot
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
when: on_failure
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment