forked from 2i2c-org/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (57 loc) · 2.31 KB
/
recurrent-regenerate-smce-creds-issue.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: "Recurrent: regenerate SMCE credentials"
on:
workflow_dispatch:
schedule:
# Run on January 6 → February 25 → April 6 → May 25, and so on
# This means a new issue will be opened every 40 to 50 days
- cron: "0 0 6 1,4,7,10 *"
- cron: "0 0 25 2,5,8,11 *"
jobs:
create_issue:
name: Create issue
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Get Deadline
id: get_deadline
# The deadline is 4 days after the issue is opened
run: |
echo "deadline=$(date -d '+4 days' +'%B %d')" >> $GITHUB_ENV
echo "deadline_as_iso_date=$(date -d '+4 days' +"%Y-%m-%d")" >> $GITHUB_ENV
- name: Create issue
run: |
issue=$(gh issue create \
--label "recurrent" \
--title "[${{ env.deadline }}] Regenerate SMCE credentials" \
--body "$BODY")
echo "issue=$issue" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ secrets.PROJECT_BOARD_PAT_TOKEN }}
GH_REPO: ${{ github.repository }}
BODY: |
The credentials of the deployer on SMCE clusters must be renewed every ~55 days.
### Context
AWS credentials for our hub deployer must be renewed for the following clusters:
- [ ] nasa-veda
- [ ] nasa-ghg
- [ ] maap
### Resources
Follow [the instructions](https://infrastructure.2i2c.org/howto/regenerate-smce-creds/#regenerate-credentials-for-the-deployer) on how to do this.
### Definition of Done
- [ ] There is a deadline for this task
- [ ] The credentials of the deployer on all 3 clusters have been renewed
- name: Sleep a bit to allow issue to be added to the board by automation
run: sleep 3
- name: Set the "Status" and "Estimate" project board fields
uses: EndBug/project-fields@v2
id: set-fields
with:
operation: set
# If the fields name or type will change
# expect this step to fail
fields: Status,Estimate,End date
github_token: ${{ secrets.PROJECT_BOARD_PAT_TOKEN }}
project_url: https://github.com/orgs/2i2c-org/projects/57
values: Up Next,1,${{ env.deadline_as_iso_date }}
resource_url: ${{ env.issue }}