-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(github): cache github issues status in S3
one github action that runs once a day, that caches the issues status from multiple github repositories and client code that can read those csv files and cache them locally, so SkipPerIssue can read first out of it and then fallback into doing direct github API calls Ref: scylladb/qa-tasks#1678
- Loading branch information
Showing
2 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Cache issues status | ||
on: | ||
schedule: | ||
# Daily at 8:20 UTC | ||
- cron: '20 8 * * *' | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
collect_n_upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
mkdir -p issues | ||
for repo in scylladb scylla-enterprise scylla-manager scylla-operator scylla-cluster-tests scylla-dtest qa-tasks ; do | ||
gh issue list --state all --json number,state,labels --limit 30000 --template '{{range .}}{{.number}},{{.state}},{{range .labels}}{{.name}}|{{end}}{{println ""}}{{end}}' --repo scylladb/$repo > issues/scylladb_$repo.csv | ||
done | ||
env: | ||
GH_TOKEN: ${{ secrets.ISSUE_ASSIGNMENT_TO_PROJECT_TOKEN }} | ||
- name: Upload folder to bucket | ||
uses: a-sync/[email protected] | ||
with: | ||
args: --recursive | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: 'us-east-1' | ||
S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | ||
S3_KEY: 'issues' | ||
FILE: ./issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters