-
Notifications
You must be signed in to change notification settings - Fork 26
166 lines (141 loc) · 5.96 KB
/
consuming.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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---
name: Consuming Projects
on:
pull_request:
types: [labeled, opened, synchronize, reopened]
permissions: {}
jobs:
e2e:
name: E2E Consuming
timeout-minutes: 30
runs-on: ubuntu-latest
if: |
( github.event.action == 'labeled' && github.event.label.name == 'e2e-projects' )
|| ( github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'e2e-projects') )
strategy:
fail-fast: false
matrix:
project: ['admiral', 'lighthouse', 'subctl', 'submariner', 'submariner-operator']
deploytool: ['operator', 'helm']
cabledriver: ['libreswan']
k8s_version: ['1.25']
exclude:
# Admiral E2E doesn't respect deploy-tool params, as it uses clusters without Submariner
- project: admiral
deploytool: helm
# Operator and Helm are mutually exclusive, don't try to use Helm in Operator repo
- project: submariner-operator
deploytool: helm
include:
# Test the same set of cable driver combinations as the consuming projects do in their CI
- project: submariner
cabledriver: wireguard
# Test multiple K8s versions only in submariner-operator, balancing coverage and jobs
- project: submariner-operator
k8s_version: '1.22'
- project: submariner-operator
k8s_version: '1.23'
- project: submariner-operator
k8s_version: '1.24'
steps:
- name: Check out the Shipyard repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Build the latest Shipyard image
run: make images
- name: Check out the ${{ matrix.project }} repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
# This is replaced to stable branch by auto release process
ref: release-0.14
repository: submariner-io/${{ matrix.project }}
path: ${{ matrix.project }}
- name: Copy Shipyard resources
run: cp -n Dockerfile.* Makefile.dapper .dapper ${{ matrix.project }}/
- name: Make sure ${{ matrix.project }} is using the built Shipyard image
run: sed -i 's/shipyard-dapper-base:*.*/shipyard-dapper-base:dev/' ${{ matrix.project }}/Dockerfile.dapper
- name: Run E2E deployment and tests
uses: ./gh-actions/e2e
with:
k8s_version: ${{ matrix.k8s_version }}
using: ${{ matrix.cabledriver }} ${{ matrix.deploytool }}
working-directory: ./${{ matrix.project }}
- name: Post mortem
if: failure()
uses: ./gh-actions/post-mortem
lint-consuming:
name: Lint
timeout-minutes: 15
runs-on: ubuntu-latest
if: |
( github.event.action == 'labeled' && github.event.label.name == 'lint-projects' )
|| ( github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'lint-projects') )
strategy:
fail-fast: false
matrix:
project: [
'admiral', 'cloud-prepare', 'coastguard', 'lighthouse',
'subctl', 'submariner', 'submariner-charts', 'submariner-operator'
]
steps:
- name: Check out the Shipyard repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Build the latest Shipyard image
run: make images
- name: Check out the ${{ matrix.project }} repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
# This is replaced to stable branch by auto release process
ref: release-0.14
repository: submariner-io/${{ matrix.project }}
path: ${{ matrix.project }}
- name: Copy Shipyard resources
run: cp -n Dockerfile.* Makefile.dapper .dapper ${{ matrix.project }}/
- name: Make sure ${{ matrix.project }} is using the built Shipyard image
run: sed -i 's/shipyard-dapper-base:*.*/shipyard-dapper-base:dev/' ${{ matrix.project }}/Dockerfile.dapper
- name: Run golangci-lint
if: always()
run: make -C ${{ matrix.project }} golangci-lint
- name: Run markdownlint
if: always()
run: make -C ${{ matrix.project }} markdownlint
- name: Run packagedoc-lint
if: always()
run: make -C ${{ matrix.project }} packagedoc-lint
- name: Run shellcheck
if: always()
run: make -C ${{ matrix.project }} shellcheck
- name: Run yamllint
if: always()
run: make -C ${{ matrix.project }} yamllint
unit-consuming:
name: Unit Tests
timeout-minutes: 15
runs-on: ubuntu-latest
if: |
( github.event.action == 'labeled' && github.event.label.name == 'unit-projects' )
|| ( github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'unit-projects') )
strategy:
fail-fast: false
matrix:
project: [
'admiral', 'cloud-prepare', 'coastguard', 'lighthouse',
'subctl', 'submariner', 'submariner-charts', 'submariner-operator'
]
steps:
- name: Check out the Shipyard repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Build the latest Shipyard image
run: make images
- name: Check out the ${{ matrix.project }} repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
# This is replaced to stable branch by auto release process
ref: release-0.14
repository: submariner-io/${{ matrix.project }}
path: ${{ matrix.project }}
- name: Copy Shipyard resources
run: cp -n Dockerfile.* Makefile.dapper .dapper ${{ matrix.project }}/
- name: Make sure ${{ matrix.project }} is using the built Shipyard image
run: sed -i 's/shipyard-dapper-base:*.*/shipyard-dapper-base:dev/' ${{ matrix.project }}/Dockerfile.dapper
- name: Run all unit tests
run: make -C ${{ matrix.project }} unit