Skip to content

Commit

Permalink
Merge pull request #25 from mozilla-mobile/slack-demo
Browse files Browse the repository at this point in the history
Set up cron job and slack notification
  • Loading branch information
rpappalax authored Sep 11, 2023
2 parents 995d62d + d8bcb2a commit bcec0e5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/demo-slack.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Send custom JSON data to Slack workflow

# Tues @4am UTC
on:
push:
branches:
- slack-demo
schedule:
- cron: "0 4 * * 2"

jobs:
build:
Expand All @@ -16,10 +16,14 @@ jobs:
uses: actions/setup-python@v1

- name: Install requirements
run: pip install -r requirements.txt
run: pip install -r ./telemetry-expiry/requirements.txt

# Temporary hard code project
- name: Run telemetry probe expiry check
run: python ./check_metrics.py -p focus-ios
run: python ./telemetry-expiry/check_metrics.py -p focus-ios

- name: Run telemetry probe expiry check
run: ls -la

- name: Demo Slack Message
id: slack
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion check_metrics.py → telemetry-expiry/check_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import yaml


CONFIG_INI = 'check_metrics.ini'
CONFIG_INI = 'telemetry-expiry/check_metrics.ini'
PAYLOAD_JSON = 'slack-payload.json'
WARN_THRESHOLD_DAYS = 7
expired_already = []
Expand Down
1 change: 1 addition & 0 deletions telemetry-expiry/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PyYAML==6.0.1

0 comments on commit bcec0e5

Please sign in to comment.