summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2023-03-21 07:10:32 -0400
committerGitHub <noreply@github.com>2023-03-21 07:10:32 -0400
commitc0719b9f3a16091f4a48971bc16c0e63d0aab946 (patch)
treef8fdcfbbd5c17abd11c90f809975b3846a3e3fe5 /.github/workflows
parent5046e034212c008557dd014196b6f6204eda24b2 (diff)
Assorted improvements for our platform EOL check code. (#14768)
* Fix typos in EOL check matrix generation. * Allow specifying a different name for distro for EOL check. If the `eol_check` property of a distro entry is a string, use that as the product name when querying https://endoflife.date/api * Add failure notifications for scheduled runs of EOL check workflow.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/platform-eol-check.yml53
1 files changed, 48 insertions, 5 deletions
diff --git a/.github/workflows/platform-eol-check.yml b/.github/workflows/platform-eol-check.yml
index 16f4fc2882..d1f4416cde 100644
--- a/.github/workflows/platform-eol-check.yml
+++ b/.github/workflows/platform-eol-check.yml
@@ -33,6 +33,26 @@ jobs:
matrix="$(.github/scripts/gen-matrix-eol-check.py)"
echo "Generated matrix: ${matrix}"
echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}"
+ - name: Failure Notification
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_COLOR: 'danger'
+ SLACK_FOOTER: ''
+ SLACK_ICON_EMOJI: ':github-actions:'
+ SLACK_TITLE: 'Failed to generate build matrix for platform EOL checks:'
+ SLACK_USERNAME: 'GitHub Actions'
+ SLACK_MESSAGE: |-
+ ${{ github.repository }}: Build matrix generation for scheduled platform EOL check has failed:
+ Checkout: ${{ steps.checkout.outcome }}
+ Prepare Tools: ${{ steps.prepare.outcome }}
+ Read Build Matrix: ${{ steps.set-matrix.outcome }}
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ if: >-
+ ${{
+ failure()
+ && github.event_name == 'schedule'
+ && github.repository == 'netdata/netdata'
+ }}
eol-check:
name: EOL Check
@@ -61,10 +81,10 @@ jobs:
;;
2)
echo "pending=false" >> "${GITHUB_OUTPUT}"
- echo "::info::No EOL information found for ${{ matrix.distro }} ${{ matrix.release }}"
+ echo "::info::No EOL information found for ${{ matrix.full_name }}"
;;
*)
- echo "::error::Failed to check EOL date for ${{ matrix.distro }} ${{ matrix.release }}"
+ echo "::error::Failed to check EOL date for ${{ matrix.full_name }}"
exit 1
;;
esac
@@ -76,9 +96,9 @@ jobs:
run: |
echo "title=[Platform EOL]: ${{ matrix.full_name }} will be EOL soon." >> "${GITHUB_OUTPUT}"
# Check if there is an existing issue in the repo for the platform EOL.
- # The actual command line to make the check is unfortunately complicated because
- # GitHub think that it’s sensible to exit with a status of 0 if there no results
- # for a search.
+ # The actual command line to make the check is unfortunately
+ # complicated because GitHub thinks that it’s sensible to exit
+ # with a status of 0 if there are no results for a search.
- name: Check for Existing Issue
id: existing
if: steps.check.outputs.pending == 'true'
@@ -108,3 +128,26 @@ jobs:
- [ ] Remove platform from `.github/data/distros.yml`
- [ ] Remove platform package builder from helper-images repo (if applicable).
- [ ] Verify any other platform support code that needs to be cleaned up.
+ # Send a notification to Slack if a job failed.
+ - name: Failure Notification
+ uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_COLOR: 'danger'
+ SLACK_FOOTER: ''
+ SLACK_ICON_EMOJI: ':github-actions:'
+ SLACK_TITLE: 'Platform EOL check failed:'
+ SLACK_USERNAME: 'GitHub Actions'
+ SLACK_MESSAGE: |-
+ ${{ github.repository }}: A scheduled check for the EOL status of ${{ matrix.full_name }} has failed.
+ Checkout: ${{ steps.checkout.outcome }}
+ Check EOL Status: ${{ steps.check.outcome }}
+ Generate Issue Title: ${{ steps.title.outcome }}
+ Check for Existing Issue: ${{ steps.existing.outcome }}
+ Create Issue: ${{ steps.create-issue.outcome }}
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
+ if: >-
+ ${{
+ failure()
+ && github.event_name == 'schedule'
+ && github.repository == 'netdata/netdata'
+ }}