This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
87 lines (70 loc) · 2.95 KB
/
e2e.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: E2E
on:
workflow_run:
workflows:
- Trigger-E2E
types:
- completed
jobs:
e2e:
runs-on: ubuntu-latest
permissions:
statuses: write
id-token: write
contents: read
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Run the action # You would run your tests before this using the output to set state/desc
uses: Sibz/github-status-action@650dd1a882a76dbbbc4576fb5974b8d22f29847f # v1.1.6
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "E2E Tests"
description: "Running E2E tests"
state: 'pending'
sha: ${{ github.event.workflow_run.head_sha }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Install yq
uses: mikefarah/yq@047694546cad8f9eaac1627bbc8bcc502fdd88bf # v4.41.1
- name: Set up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.13.2
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.11
- name: Set up chart-testing
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
- name: Setup G Cloud SDK
uses: google-github-actions/setup-gcloud@e30db14379863a8c79331b04a9969f4c1e225e0b # v2.0.11
- name: Setup chainctl
uses: chainguard-dev/actions/setup-chainctl@main
with:
# The Chainguard identity to assume when talking to Enforce.
identity: ${{ secrets.CHAINCTL_IDENTITY }}
- run: |
INVITE_CODE=$(chainctl iam invite create ${{ secrets.CHAINCTL_E2E_GROUP }} --cluster -ojson | jq -r '.code')
yq -i '.inviteCode = ${INVITE_CODE}' charts/enforce-agent/ci/ci-values.yaml
- name: Create KIND Cluster
uses: helm/kind-action@99576bfa6ddf9a8e612d83b513da5a75875caced # v1.9.0
- name: Run chart-testing (install)
run: ct install --config ct.yaml
- name: Run the action # You would run your tests before this using the output to set state/desc
if: ${{ success() }}
uses: Sibz/github-status-action@650dd1a882a76dbbbc4576fb5974b8d22f29847f # v1.1.6
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "E2E Tests"
description: "passed!"
state: 'success'
sha: ${{ github.event.workflow_run.head_sha }}
- name: Run the action # You would run your tests before this using the output to set state/desc
if: ${{ failure() }}
uses: Sibz/github-status-action@650dd1a882a76dbbbc4576fb5974b8d22f29847f # v1.1.6
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "E2E Tests"
description: "E2E failed!"
state: 'failure'
sha: ${{ github.event.workflow_run.head_sha }}