-
Notifications
You must be signed in to change notification settings - Fork 37
97 lines (96 loc) · 2.93 KB
/
e2e-branch.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
88
89
90
91
92
93
94
95
96
97
name: E2E test branch
on:
workflow_call:
secrets:
AWS_ACCESS_KEY_ID:
description: "AWS Access Key ID"
required: true
AWS_SECRET_ACCESS_KEY:
description: "AWS Secret Access Key"
required: true
AWS_REGION:
description: "AWS Region"
required: true
SLACK_WEBHOOK_URL:
description: "WebHook URL to use for Slack"
required: true
inputs:
branch:
type: string
default: "release-v2.9"
jobs:
e2e-tests:
env:
BRANCH: ${{ inputs.branch }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: |
${{ env.BRANCH }}
- name: Login to GHCR registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- name: Build and push image
env:
REPO: ghcr.io/rancher
run: |
make image-push
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
version: v0.23.0
install_only: true
- name: Create kind cluster
run: make setup-kind
- name: E2E tests
env:
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
REPO: ghcr.io/rancher
run: make e2e-tests
- name: Archive artifacts
if: always()
uses: actions/upload-artifact@v4.6.0
with:
name: ci-artifacts-${{ env.BRANCH }}
path: _artifacts
if-no-files-found: ignore
- name: Send failed status to slack
if: failure() && github.event_name == 'schedule'
uses: slackapi/slack-github-action@v2.0.0
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "AKS Operator E2E test run failed."
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": ":github:",
"emoji": true
},
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK