forked from crsullivan13/DOSvBRU-firesim
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 2.21 KB
/
firesim-cleanup.yml
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
name: firesim-cleanup
on:
schedule:
- cron: "0,30 */1 * * *"
defaults:
run:
shell: bash -leo pipefail {0}
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.BARTENDER_PERSONAL_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_DEFAULT_REGION: ${{ secrets.AZURE_DEFAULT_REGION }}
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }}
AZURE_CI_SUBNET_ID : ${{ secrets.AZURE_CI_SUBNET_ID }}
AZURE_CI_NSG_ID : ${{ secrets.AZURE_CI_NSG_ID }}
FIRESIM_PEM: ${{ secrets.FIRESIM_PEM }}
FIRESIM_PEM_PUBLIC: ${{ secrets.FIRESIM_PEM_PUBLIC }}
MANAGER_FIRESIM_LOCATION: "~/firesim"
REMOTE_WORK_DIR: unused
TERM: xterm-256-color
jobs:
cull-old-ci-instances:
name: cull-old-ci-instances
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: conda-reqs/ci-shared.yaml
miniforge-version: latest
- uses: ./.github/actions/repo-setup-aws
- run: .github/scripts/cull-old-ci-instances.py
- if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: firesim-github-update
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: "CULLED CI INSTANCES (PLEASE VERIFY CI IS WORKING CORRECTLY!)"
SLACK_MESSAGE: "@channel. Please verify: https://github.com/firesim/firesim/actions/workflows/firesim-cleanup.yml"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
cull-old-ci-runners:
name: cull-old-ci-runners
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: conda-reqs/ci-shared.yaml
miniforge-version: latest
- uses: ./.github/actions/repo-setup-aws
- run: .github/scripts/cull-old-ci-runners.py