This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
120 lines (105 loc) · 3.6 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: e2e-mpas
on:
repository_dispatch:
types: [ component.controlplane.mpas.updated ]
pull_request:
paths-ignore:
- 'CODE_OF_CONDUCT.md'
- 'README.md'
- 'Contributing.md'
branches:
- main
push:
branches:
- main
schedule:
- cron: '0 6 * * *' # 6 AM UTC everyday for default branch
permissions:
contents: read # for actions/checkout to fetch code
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run-e2e-suite:
runs-on: ubuntu-latest
steps:
- run: curl -s https://fluxcd.io/install.sh | sudo bash
- name: Checkout mpas repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
path: MPAS
- name: Checkout ocm-controller
uses: actions/checkout@v4
with:
repository: open-component-model/ocm-controller
path: ocm-controller
- name: Checkout mpas-project-controller
uses: actions/checkout@v4
with:
repository: open-component-model/mpas-project-controller
path: mpas-project-controller
- name: Checkout mpas-product-controller
uses: actions/checkout@v4
with:
repository: open-component-model/mpas-product-controller
path: mpas-product-controller
- name: Checkout replication-controller
uses: actions/checkout@v4
with:
repository: open-component-model/replication-controller
path: replication-controller
- name: Checkout git-controller
uses: actions/checkout@v4
with:
repository: open-component-model/git-controller
path: git-controller
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: '${{ github.workspace }}/MPAS/go.mod'
- name: Restore Go cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Kubernetes
uses: helm/[email protected]
with:
install_only: true
- uses: yokawasa/[email protected]
with:
kustomize: '5.0.1'
tilt: '0.32.2'
- name: Run E2E tests
id: e2e-tests
working-directory: MPAS
run: make e2e
- name: Notify on Failure/Success
id: slack-notification
uses: slackapi/[email protected]
if: ${{ github.ref_name == 'main' && github.event_name == 'schedule' && always() }}
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
# You can pass in multiple channels to post to by providing a comma-delimited list of channel IDs.
channel-id: 'C03NF7KH128'
# For posting a simple plain text message
payload: |
{
"text": "${{ github.repository }} e2e Tests Status: ${{ steps.e2e-tests.conclusion }}",
"blocks": [
{
"type": "section",
"text":
{
"type": "mrkdwn",
"text": "e2e Test for MPAS ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }} <https://github.com/open-component-model/MPAS/actions/workflows/e2e.yaml|Github Action>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.OCM_GITHUB_SLACK_BOT_TOKEN }}