Skip to content

Commit 25b4356

Browse files
authored
ci: Extract manifest specs from workflow to config.yml (#494)
Signed-off-by: Ryan Northey <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
1 parent 41eb76c commit 25b4356

File tree

2 files changed

+163
-125
lines changed

2 files changed

+163
-125
lines changed

.github/config.yml

Lines changed: 144 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,146 @@
1+
# Configuration for envoy-build-tools CI/CD
2+
# Each distro (debian/ubuntu) contains:
3+
# - ci.paths: Path-based build detection
4+
# - manifests: OCI manifest specifications
5+
# Note: {sha} placeholder will be replaced with the actual docker SHA at runtime
6+
17
debian:
2-
paths:
3-
- docker/linux/debian/**
4-
- docker/linux/debian_build.sh
5-
- docker/push.sh
6-
- docker/linux/build.sh
7-
- docker/linux/common_fun.sh
8-
- docker/linux/group_manifests.sh
9-
- .github/workflows/**
8+
ci:
9+
paths:
10+
- docker/linux/debian/*
11+
- docker/linux/debian_build.sh
12+
- docker/push.sh
13+
- docker/linux/build.sh
14+
- docker/linux/common_fun.sh
15+
- docker/linux/group_manifests.sh
16+
- .github/**/*
17+
manifests:
18+
# devtools
19+
- name: envoy-build
20+
tag: devtools-{sha}
21+
registry: docker.io/envoyproxy
22+
architectures:
23+
- amd64
24+
- arm64
25+
artifact-pattern: oci-debian-{arch}/debian-devtools-{sha}-{arch}.tar
26+
# ci
27+
- name: envoy-build
28+
tag: ci-{sha}
29+
registry: docker.io/envoyproxy
30+
architectures:
31+
- amd64
32+
- arm64
33+
artifact-pattern: oci-debian-{arch}/debian-ci-{sha}-{arch}.tar
34+
# worker
35+
- name: envoy-build
36+
tag: worker-{sha}
37+
registry: docker.io/envoyproxy
38+
architectures:
39+
- amd64
40+
- arm64
41+
artifact-pattern: oci-debian-{arch}/debian-worker-{sha}-{arch}.tar
42+
# worker (gcr)
43+
- name: envoy-build
44+
tag: worker-{sha}
45+
registry: gcr.io/envoy-ci
46+
architectures:
47+
- amd64
48+
- arm64
49+
artifact-pattern: oci-debian-{arch}/debian-worker-{sha}-{arch}.tar
50+
# gcc
51+
- name: envoy-build
52+
tag: gcc-{sha}
53+
registry: docker.io/envoyproxy
54+
architectures:
55+
- amd64
56+
- arm64
57+
artifact-pattern: oci-debian-{arch}/debian-gcc-{sha}-{arch}.tar
58+
# gcc (gcr)
59+
- name: envoy-build
60+
tag: gcc-{sha}
61+
registry: gcr.io/envoy-ci
62+
architectures:
63+
- amd64
64+
- arm64
65+
artifact-pattern: oci-debian-{arch}/debian-gcc-{sha}-{arch}.tar
66+
# docker
67+
- name: envoy-build
68+
tag: docker-{sha}
69+
registry: docker.io/envoyproxy
70+
architectures:
71+
- amd64
72+
- arm64
73+
artifact-pattern: oci-debian-{arch}/debian-docker-{sha}-{arch}.tar
74+
# test
75+
- name: envoy-build
76+
tag: test-{sha}
77+
registry: docker.io/envoyproxy
78+
architectures:
79+
- amd64
80+
- arm64
81+
artifact-pattern: oci-debian-{arch}/debian-test-{sha}-{arch}.tar
82+
# llvm
83+
- name: envoy-build
84+
tag: llvm-{sha}
85+
registry: docker.io/envoyproxy
86+
architectures:
87+
- amd64
88+
artifact-pattern: oci-debian-{arch}/debian-llvm-{sha}-{arch}.tar
89+
# mobile
90+
- name: envoy-build
91+
tag: mobile-{sha}
92+
registry: docker.io/envoyproxy
93+
architectures:
94+
- amd64
95+
artifact-pattern: oci-debian-{arch}/debian-mobile-{sha}-{arch}.tar
96+
1097
ubuntu:
11-
paths:
12-
- docker/linux/ubuntu/**
13-
- docker/push.sh
14-
- docker/linux/build.sh
15-
- docker/linux/common_fun.sh
16-
- docker/linux/group_manifests.sh
17-
- .github/workflows/**
98+
ci:
99+
paths:
100+
- docker/linux/ubuntu/*
101+
- docker/push.sh
102+
- docker/linux/build.sh
103+
- docker/linux/common_fun.sh
104+
- docker/linux/group_manifests.sh
105+
- .github/**/*
106+
manifests:
107+
# ci
108+
- name: envoy-build-ubuntu
109+
tag: ci-{sha}
110+
registry: docker.io/envoyproxy
111+
architectures:
112+
- arm64
113+
- amd64
114+
artifact-pattern: oci-ubuntu-{arch}/ubuntu-ci-{sha}-{arch}.tar
115+
# mobile
116+
- name: envoy-build-ubuntu
117+
tag: mobile-{sha}
118+
registry: docker.io/envoyproxy
119+
architectures:
120+
- amd64
121+
artifact-pattern: oci-ubuntu-{arch}/ubuntu-mobile-{sha}-{arch}.tar
122+
# test
123+
- name: envoy-build-ubuntu
124+
tag: test-{sha}
125+
registry: docker.io/envoyproxy
126+
architectures:
127+
- amd64
128+
artifact-pattern: oci-ubuntu-{arch}/ubuntu-test-{sha}-{arch}.tar
129+
# full
130+
- name: envoy-build-ubuntu
131+
tag: full-{sha}
132+
registry: docker.io/envoyproxy
133+
architectures:
134+
- amd64
135+
- arm64
136+
artifact-pattern: oci-ubuntu-{arch}/ubuntu-full-{sha}-{arch}.tar
137+
additional-tags:
138+
- "{sha}"
139+
# full (gcr)
140+
- name: envoy-build
141+
tag: "{sha}"
142+
registry: gcr.io/envoy-ci
143+
architectures:
144+
- amd64
145+
- arm64
146+
artifact-pattern: oci-ubuntu-{arch}/ubuntu-full-{sha}-{arch}.tar

.github/workflows/build.yml

Lines changed: 19 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
input: .github/config.yml
3939
input-format: yaml-path
4040
filter: |
41-
.
41+
{debian: .debian.ci, ubuntu: .ubuntu.ci}
4242
- uses: envoyproxy/toolshed/gh-actions/[email protected]
4343
id: torun
4444
with:
@@ -137,122 +137,31 @@ jobs:
137137
id: config-debian
138138
uses: envoyproxy/toolshed/gh-actions/[email protected]
139139
with:
140-
input-format: yaml
140+
input: .github/config.yml
141+
input-format: yaml-path
141142
filter: >-
142-
{manifests: .}
143-
input: |
144-
- name: envoy-build
145-
tag: devtools-${{ steps.docker-sha.outputs.sha }}
146-
registry: docker.io/envoyproxy
147-
architectures:
148-
- amd64
149-
- arm64
150-
artifact-pattern: oci-debian-{arch}/debian-devtools-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
151-
- name: envoy-build
152-
tag: ci-${{ steps.docker-sha.outputs.sha }}
153-
registry: docker.io/envoyproxy
154-
architectures:
155-
- amd64
156-
- arm64
157-
artifact-pattern: oci-debian-{arch}/debian-ci-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
158-
- name: envoy-build
159-
tag: worker-${{ steps.docker-sha.outputs.sha }}
160-
registry: docker.io/envoyproxy
161-
architectures:
162-
- amd64
163-
- arm64
164-
artifact-pattern: oci-debian-{arch}/debian-worker-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
165-
- name: envoy-build
166-
tag: worker-${{ steps.docker-sha.outputs.sha }}
167-
registry: gcr.io/envoy-ci
168-
architectures:
169-
- amd64
170-
- arm64
171-
artifact-pattern: oci-debian-{arch}/debian-worker-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
172-
- name: envoy-build
173-
tag: gcc-${{ steps.docker-sha.outputs.sha }}
174-
registry: docker.io/envoyproxy
175-
architectures:
176-
- amd64
177-
- arm64
178-
artifact-pattern: oci-debian-{arch}/debian-gcc-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
179-
- name: envoy-build
180-
tag: gcc-${{ steps.docker-sha.outputs.sha }}
181-
registry: gcr.io/envoy-ci
182-
architectures:
183-
- amd64
184-
- arm64
185-
artifact-pattern: oci-debian-{arch}/debian-gcc-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
186-
- name: envoy-build
187-
tag: docker-${{ steps.docker-sha.outputs.sha }}
188-
registry: docker.io/envoyproxy
189-
architectures:
190-
- amd64
191-
- arm64
192-
artifact-pattern: oci-debian-{arch}/debian-docker-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
193-
- name: envoy-build
194-
tag: test-${{ steps.docker-sha.outputs.sha }}
195-
registry: docker.io/envoyproxy
196-
architectures:
197-
- amd64
198-
- arm64
199-
artifact-pattern: oci-debian-{arch}/debian-test-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
200-
- name: envoy-build
201-
tag: llvm-${{ steps.docker-sha.outputs.sha }}
202-
registry: docker.io/envoyproxy
203-
architectures:
204-
- amd64
205-
artifact-pattern: oci-debian-{arch}/debian-llvm-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
206-
- name: envoy-build
207-
tag: mobile-${{ steps.docker-sha.outputs.sha }}
208-
registry: docker.io/envoyproxy
209-
architectures:
210-
- amd64
211-
artifact-pattern: oci-debian-{arch}/debian-mobile-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
143+
.debian.manifests
144+
| map(. + {
145+
tag: (.tag | gsub("{sha}"; "${{ steps.docker-sha.outputs.sha }}")),
146+
"artifact-pattern": (.["artifact-pattern"] | gsub("{sha}"; "${{ steps.docker-sha.outputs.sha }}")),
147+
"additional-tags": (if .["additional-tags"] then .["additional-tags"] | map(gsub("{sha}"; "${{ steps.docker-sha.outputs.sha }}")) else null end)
148+
})
149+
| {manifests: .}
212150
- name: Generate manifest configuration (Ubuntu)
213151
if: steps.built-distros.outputs.include-ubuntu == 'true'
214152
id: config-ubuntu
215153
uses: envoyproxy/toolshed/gh-actions/[email protected]
216154
with:
217-
input-format: yaml
155+
input: .github/config.yml
156+
input-format: yaml-path
218157
filter: >-
219-
{manifests: .}
220-
input: |
221-
- name: envoy-build-ubuntu
222-
tag: ci-${{ steps.docker-sha.outputs.sha }}
223-
registry: docker.io/envoyproxy
224-
architectures:
225-
- arm64
226-
- amd64
227-
artifact-pattern: oci-ubuntu-{arch}/ubuntu-ci-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
228-
- name: envoy-build-ubuntu
229-
tag: mobile-${{ steps.docker-sha.outputs.sha }}
230-
registry: docker.io/envoyproxy
231-
architectures:
232-
- amd64
233-
artifact-pattern: oci-ubuntu-{arch}/ubuntu-mobile-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
234-
- name: envoy-build-ubuntu
235-
tag: test-${{ steps.docker-sha.outputs.sha }}
236-
registry: docker.io/envoyproxy
237-
architectures:
238-
- amd64
239-
artifact-pattern: oci-ubuntu-{arch}/ubuntu-test-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
240-
- name: envoy-build-ubuntu
241-
tag: full-f8d1fd9bdac3a7843d1e69816456648989d238be
242-
registry: docker.io/envoyproxy
243-
architectures:
244-
- amd64
245-
- arm64
246-
artifact-pattern: oci-ubuntu-{arch}/ubuntu-full-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
247-
additional-tags:
248-
- ${{ steps.docker-sha.outputs.sha }}
249-
- name: envoy-build
250-
tag: ${{ steps.docker-sha.outputs.sha }}
251-
registry: gcr.io/envoy-ci
252-
architectures:
253-
- amd64
254-
- arm64
255-
artifact-pattern: oci-ubuntu-{arch}/ubuntu-full-${{ steps.docker-sha.outputs.sha }}-{arch}.tar
158+
.ubuntu.manifests
159+
| map(. + {
160+
tag: (.tag | gsub("{sha}"; "${{ steps.docker-sha.outputs.sha }}")),
161+
"artifact-pattern": (.["artifact-pattern"] | gsub("{sha}"; "${{ steps.docker-sha.outputs.sha }}")),
162+
"additional-tags": (if .["additional-tags"] then .["additional-tags"] | map(gsub("{sha}"; "${{ steps.docker-sha.outputs.sha }}")) else null end)
163+
})
164+
| {manifests: .}
256165
- name: Merge manifest configurations
257166
id: config
258167
if: >-

0 commit comments

Comments
 (0)