Skip to content

Commit b848a66

Browse files
committed
Merge branch 'main' of github-agrawroh:envoyproxy/envoy into feat-dm-bts-11
2 parents 0f5267a + 76dea9f commit b848a66

File tree

200 files changed

+12832
-582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+12832
-582
lines changed

.github/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ checks:
110110
- precheck-external
111111
- precheck-format
112112
- precheck-publish
113+
- precheck-publish-config
113114
required: true
114115
# yamllint disable rule:line-length
115116
advice:
@@ -358,6 +359,9 @@ run:
358359
precheck-publish:
359360
paths:
360361
- "**/*"
362+
precheck-publish-config:
363+
paths:
364+
- "**/*"
361365
release:
362366
paths:
363367
- .bazelrc

.github/workflows/_check_coverage.yml

Lines changed: 54 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ concurrency:
2424

2525
jobs:
2626
coverage:
27-
secrets:
28-
gcp-key: ${{ secrets.gcp-key }}
2927
permissions:
3028
actions: read
3129
contents: read
@@ -45,26 +43,68 @@ jobs:
4543
rbe: true
4644
request: ${{ inputs.request }}
4745
runs-on: ${{ fromJSON(inputs.request).config.ci.agent-ubuntu }}
48-
steps-post: |
49-
- uses: envoyproxy/toolshed/actions/gcs/artefact/sync@35f9bcf37d0ceaedea0250da014348ce4bdf8d35 # v0.4.1
50-
with:
51-
bucket: ${{ inputs.trusted && vars.GCS_ARTIFACT_BUCKET_POST || vars.GCS_ARTIFACT_BUCKET_PRE }}
52-
path: generated/${{ matrix.target }}/html
53-
path-upload: ${{ matrix.target }}
54-
sha: ${{ fromJSON(inputs.request).request.sha }}
55-
redirect: >-
56-
${{ vars.GCS_ARTIFACT_PREFIX
57-
&& format('{0}-', vars.GCS_ARTIFACT_PREFIX)
58-
}}${{ fromJSON(inputs.request).request.pr
59-
|| fromJSON(inputs.request).request.target-branch }}
46+
steps-post: ${{ matrix.steps-post }}
6047
target: ${{ matrix.target }}
6148
timeout-minutes: 180
49+
upload-name: ${{ matrix.target }}
50+
upload-path: generated/${{ matrix.target }}/html
6251
trusted: ${{ inputs.trusted }}
6352
strategy:
6453
fail-fast: false
6554
matrix:
6655
include:
6756
- target: coverage
6857
name: Coverage
58+
upload-name: coverage
59+
upload-path: generated/coverage/html
60+
steps-post: |
61+
- uses: envoyproxy/toolshed/actions/jq@35f9bcf37d0ceaedea0250da014348ce4bdf8d35 # v0.4.1
62+
with:
63+
output-path: generated/coverage/html/gcs-metadata.json
64+
input-format: yaml
65+
input: |
66+
bucket: ${{
67+
inputs.trusted
68+
&& vars.GCS_ARTIFACT_BUCKET_POST
69+
|| vars.GCS_ARTIFACT_BUCKET_PRE }}
70+
sha: ${{ fromJSON(inputs.request).request.sha }}
71+
path_upload: coverage
72+
redirect: ${{
73+
vars.GCS_ARTIFACT_PREFIX && format('{0}-', vars.GCS_ARTIFACT_PREFIX)
74+
}}${{ fromJSON(inputs.request).request.pr
75+
|| fromJSON(inputs.request).request.target-branch }}
76+
- shell: bash
77+
run: |
78+
ln -sf %{{ github.workspace }}/generated %{{ runner.temp }}/generated
6979
- target: fuzz_coverage
7080
name: Fuzz coverage
81+
steps-post: |
82+
- uses: envoyproxy/toolshed/actions/jq@35f9bcf37d0ceaedea0250da014348ce4bdf8d35 # v0.4.1
83+
with:
84+
output-path: generated/fuzz_coverage/html/gcs-metadata.json
85+
input-format: yaml
86+
input: |
87+
bucket: ${{
88+
inputs.trusted
89+
&& vars.GCS_ARTIFACT_BUCKET_POST
90+
|| vars.GCS_ARTIFACT_BUCKET_PRE }}
91+
sha: ${{ fromJSON(inputs.request).request.sha }}
92+
path_upload: fuzz_coverage
93+
redirect: ${{
94+
vars.GCS_ARTIFACT_PREFIX && format('{0}-', vars.GCS_ARTIFACT_PREFIX)
95+
}}${{ fromJSON(inputs.request).request.pr
96+
|| fromJSON(inputs.request).request.target-branch }}
97+
- shell: bash
98+
run: |
99+
ln -sf %{{ github.workspace }}/generated %{{ runner.temp }}/generated
100+
101+
upload:
102+
secrets:
103+
gcp-key: ${{ secrets.gcp-key }}
104+
if: >-
105+
!cancelled()
106+
needs: coverage
107+
uses: ./.github/workflows/_upload_gcs.yml
108+
with:
109+
artifacts: |
110+
["coverage", "fuzz_coverage"]

.github/workflows/_precheck_publish.yml

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ concurrency:
2323

2424
jobs:
2525
publish:
26-
secrets:
27-
gcp-key: ${{ secrets.gcp-key }}
2826
permissions:
2927
actions: read
3028
contents: read
@@ -47,10 +45,13 @@ jobs:
4745
ERROR
4846
error:
4947
Error:
48+
skip: ${{ matrix.skip != false && true || false }}
5049
steps-post: ${{ matrix.steps-post }}
5150
target: ${{ matrix.target }}
5251
target-suffix: ${{ matrix.target-suffix }}
5352
trusted: ${{ inputs.trusted }}
53+
upload-name: ${{ matrix.upload-name }}
54+
upload-path: ${{ matrix.upload-path }}
5455
strategy:
5556
fail-fast: false
5657
matrix:
@@ -72,6 +73,7 @@ jobs:
7273
bazel-cache: true
7374
bazel-cache-output-base: docs
7475
rbe: true
76+
skip: ${{ ! fromJSON(inputs.request).run.precheck-publish-config }}
7577
- target: docs
7678
name: Docs
7779
bazel-cache: true
@@ -80,15 +82,35 @@ jobs:
8082
--config=rbe
8183
--config=docs-ci
8284
rbe: true
85+
upload-name: docs
86+
upload-path: generated/docs
8387
steps-post: |
84-
- uses: envoyproxy/toolshed/actions/gcs/artefact/sync@35f9bcf37d0ceaedea0250da014348ce4bdf8d35 # v0.4.1
88+
- uses: envoyproxy/toolshed/actions/jq@35f9bcf37d0ceaedea0250da014348ce4bdf8d35 # v0.4.1
8589
with:
86-
bucket: ${{ inputs.trusted && vars.GCS_ARTIFACT_BUCKET_POST || vars.GCS_ARTIFACT_BUCKET_PRE }}
87-
path: generated/docs
88-
path-upload: docs
89-
sha: ${{ fromJSON(inputs.request).request.sha }}
90-
redirect: >-
91-
${{ vars.GCS_ARTIFACT_PREFIX
92-
&& format('{0}-', vars.GCS_ARTIFACT_PREFIX)
93-
}}${{ fromJSON(inputs.request).request.pr
94-
|| fromJSON(inputs.request).request.target-branch }}
90+
output-path: generated/docs/gcs-metadata.json
91+
input-format: yaml
92+
input: |
93+
bucket: ${{
94+
inputs.trusted
95+
&& vars.GCS_ARTIFACT_BUCKET_POST
96+
|| vars.GCS_ARTIFACT_BUCKET_PRE }}
97+
sha: ${{ fromJSON(inputs.request).request.sha }}
98+
path_upload: docs
99+
redirect: ${{
100+
vars.GCS_ARTIFACT_PREFIX && format('{0}-', vars.GCS_ARTIFACT_PREFIX)
101+
}}${{ fromJSON(inputs.request).request.pr
102+
|| fromJSON(inputs.request).request.target-branch }}
103+
- shell: bash
104+
run: |
105+
ln -sf %{{ github.workspace }}/generated %{{ runner.temp }}/generated
106+
107+
upload:
108+
secrets:
109+
gcp-key: ${{ secrets.gcp-key }}
110+
if: >-
111+
!cancelled()
112+
needs: publish
113+
uses: ./.github/workflows/_upload_gcs.yml
114+
with:
115+
artifacts: |
116+
["docs"]

.github/workflows/_publish_release_container.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,17 @@ jobs:
141141
with:
142142
input-format: yaml
143143
filter: >-
144-
{manifests: .}
144+
.version as $v
145+
| {manifests:
146+
[.manifests[]
147+
| select(
148+
(.tag | test("contrib-distroless") | not)
149+
or ($v.major > 1 or ($v.major == 1 and $v.minor >= 37)))]}
145150
input: |
151+
version:
152+
major: ${{ inputs.version-major }}
153+
minor: ${{ inputs.version-minor }}
154+
manifests:
146155
- name: ${{ inputs.dockerhub-repo }}
147156
tag: v${{ inputs.version-major }}.${{ inputs.version-minor }}.${{ inputs.version-patch }}
148157
registry: docker.io/envoyproxy

.github/workflows/_request.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,18 @@ jobs:
202202
docker:
203203
x64: ${{ steps.cache-exists-docker-x64.outputs.cache-hit || 'false' }}
204204
arm64: ${{ steps.cache-exists-docker-arm64.outputs.cache-hit || 'false' }}
205+
target-branch: ${{ fromJSON(steps.env.outputs.data).request.target-branch }}
206+
filter: |
207+
.["target-branch"] as $branch
208+
| if ($branch | test("^release/v[0-9]+\\.[0-9]+$")) then
209+
($branch | sub("^release/v"; "") + ".0") as $version_str
210+
| ($version_str | utils::version) as $version
211+
| if ($version.major < 1 or ($version.major == 1 and $version.minor <= 37)) then
212+
.bazel["docs-x64"] = "skip"
213+
| .bazel["external-x64"] = "skip"
214+
else . end
215+
else . end
216+
| del(.["target-branch"])
205217
206218
cache:
207219
permissions:

.github/workflows/_request_cache.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
secrets:
5353
app-id: ${{ secrets.app-id }}
5454
app-key: ${{ secrets.app-key }}
55-
name: ${{ matrix.name || matrix.target }}
55+
name: ${{ matrix.name }}
5656
uses: ./.github/workflows/_request_cache_bazel.yml
5757
with:
5858
arch: ${{ matrix.arch || 'x64' }}

.github/workflows/_request_cache_bazel.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ jobs:
5555
${{
5656
(inputs.output-base == 'base'
5757
&& ! fromJSON(inputs.caches).bazel[inputs.arch])
58-
|| ! fromJSON(inputs.caches).bazel[format('{0}-{1}', inputs.output-base, inputs.arch)]
58+
|| (inputs.output-base != 'base'
59+
&& ! fromJSON(inputs.caches).bazel[format('{0}-{1}', inputs.output-base, inputs.arch)])
5960
}}
6061
steps:
6162
- uses: envoyproxy/toolshed/actions/bind-mounts@35f9bcf37d0ceaedea0250da014348ce4bdf8d35 # v0.4.1

.github/workflows/_run.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ on:
88
secrets:
99
app-id:
1010
app-key:
11-
dockerhub-password:
12-
gcp-key:
1311
gpg-key:
1412
gpg-key-password:
15-
rbe-key:
1613
ssh-key:
1714
ssh-key-extra:
1815
inputs:
@@ -376,12 +373,6 @@ jobs:
376373
name: Configure PR Bazel settings
377374
if: >-
378375
${{ fromJSON(inputs.request).request.pr != '' }}
379-
- uses: envoyproxy/toolshed/actions/gcp/setup@35f9bcf37d0ceaedea0250da014348ce4bdf8d35 # v0.4.1
380-
name: Setup GCP (artefacts)
381-
id: gcp
382-
with:
383-
key: ${{ secrets.gcp-key }}
384-
key-copy: ${{ inputs.rbe-google && runner.temp || '' }}
385376
- run: |
386377
echo "${{ vars.ENVOY_CI_BAZELRC }}" > repo.bazelrc
387378
if: ${{ vars.ENVOY_CI_BAZELRC }}
@@ -423,11 +414,8 @@ jobs:
423414
working-directory: ${{ inputs.working-directory }}
424415
env:
425416
GITHUB_TOKEN: ${{ inputs.trusted && steps.appauth.outputs.token || github.token }}
426-
DOCKERHUB_USERNAME: ${{ inputs.dockerhub-username }}
427-
DOCKERHUB_PASSWORD: ${{ secrets.dockerhub-password }}
428417
ENVOY_DOCKER_BUILD_DIR: ${{ runner.temp }}/container
429418
ENVOY_RBE: ${{ inputs.rbe == true && 1 || '' }}
430-
RBE_KEY: ${{ secrets.rbe-key }}
431419
BAZEL_BUILD_EXTRA_OPTIONS: >-
432420
${{ env.BAZEL_BUILD_EXTRA_OPTIONS }}
433421
--config=remote-ci

.github/workflows/_upload_gcs.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Upload to GCS
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_call:
8+
secrets:
9+
gcp-key:
10+
required: true
11+
inputs:
12+
artifacts:
13+
description: JSON array of artifacts to upload to GCS
14+
type: string
15+
required: true
16+
17+
18+
jobs:
19+
upload:
20+
runs-on: ubuntu-24.04
21+
permissions:
22+
contents: read
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
artifact: ${{ fromJSON(inputs.artifacts) }}
27+
steps:
28+
- uses: actions/download-artifact@v4.1.3
29+
with:
30+
name: ${{ matrix.artifact }}
31+
path: ${{ matrix.artifact }}
32+
- uses: envoyproxy/toolshed/actions/jq@35f9bcf37d0ceaedea0250da014348ce4bdf8d35 # v0.4.1
33+
id: metadata
34+
with:
35+
input: ${{ matrix.artifact }}/gcs-metadata.json
36+
input-format: json-path
37+
- run: |
38+
rm -rf ${{ matrix.artifact }}/gcs-metadata.json
39+
- uses: envoyproxy/toolshed/actions/gcp/setup@35f9bcf37d0ceaedea0250da014348ce4bdf8d35 # v0.4.1
40+
with:
41+
key: ${{ secrets.gcp-key }}
42+
- uses: envoyproxy/toolshed/actions/gcs/artefact/sync@35f9bcf37d0ceaedea0250da014348ce4bdf8d35 # v0.4.1
43+
with:
44+
bucket: ${{ fromJSON(steps.metadata.outputs.value).bucket }}
45+
path: ${{ matrix.artifact }}
46+
path-upload: ${{ matrix.artifact }}
47+
sha: ${{ fromJSON(steps.metadata.outputs.value).sha }}
48+
redirect: ${{ fromJSON(steps.metadata.outputs.value).redirect }}

.github/workflows/request.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,31 @@ concurrency:
2828

2929

3030
jobs:
31+
# Envoy (and mirror repos) have an environment setup that requires maintainer approval
32+
# to use it. This CI checks if the request is from a first-time contributor, and in that
33+
# case it uses the environment and requires the permission to proceed.
34+
authorize:
35+
if: >-
36+
${{ github.repository == 'envoyproxy/envoy'
37+
|| (vars.ENVOY_CI && github.event_name != 'schedule')
38+
|| (vars.ENVOY_SCHEDULED_CI && github.event_name == 'schedule') }}
39+
runs-on: ubuntu-24.04
40+
environment: >-
41+
${{ github.event_name == 'pull_request_target'
42+
&& github.event.pull_request.author_association != 'MEMBER'
43+
&& github.event.pull_request.author_association != 'COLLABORATOR'
44+
&& github.event.pull_request.author_association != 'CONTRIBUTOR'
45+
&& github.event.pull_request.author_association != 'OWNER'
46+
&& 'external-contributors'
47+
|| '' }}
48+
steps:
49+
- run: |
50+
echo "Authorized"
51+
echo " Event: ${{ github.event_name }}"
52+
echo " Author association: ${{ github.event.pull_request.author_association }}"
53+
3154
request:
55+
needs: authorize
3256
permissions:
3357
actions: write
3458
contents: read

0 commit comments

Comments
 (0)