Skip to content

Commit fb215d9

Browse files
committed
ci/docs: Improve docs CI
- enable RBE - add artifact uploads Signed-off-by: Ryan Northey <ryan@synca.io>
1 parent 2d56886 commit fb215d9

File tree

3 files changed

+35
-15
lines changed

3 files changed

+35
-15
lines changed

.github/workflows/docs.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ concurrency:
1616
1717
jobs:
1818
docs:
19+
permissions:
20+
contents: read
21+
packages: read
1922
runs-on: ubuntu-24.04
2023
steps:
2124
- uses: envoyproxy/toolshed/actions/bind-mounts@598eacce15ab5f208102a2fd5669292868002701 # v0.4.0
@@ -41,15 +44,28 @@ jobs:
4144
path: examples
4245
- run: |
4346
export UID
44-
echo 'load("@envoy_examples//bazel:env.bzl", "envoy_examples_env")' >> ../envoy/WORKSPACE
45-
echo 'envoy_examples_env()' >> ../envoy/WORKSPACE
47+
48+
cat >> ../envoy/WORKSPACE << 'EOF'
49+
load("@envoy_examples//bazel:env.bzl", "envoy_examples_env")
50+
envoy_examples_env()
51+
EOF
52+
53+
cat > ../envoy/repo.bazelrc << 'EOF'
54+
common --config=ci
55+
common --config=rbe
56+
common --config=bes
57+
EOF
58+
4659
docker compose run docs
4760
working-directory: examples
4861
env:
49-
BAZEL_BUILD_EXTRA_OPTIONS: >-
50-
--override_repository=envoy_examples=../examples
51-
--config=ci
52-
--@rules_python//python/config_settings:bootstrap_impl=script
5362
BUILDKIT_PROGRESS: quiet
5463
COMPOSE_BAKE: true
5564
DOCKER_BUILDKIT: 1
65+
GITHUB_TOKEN: ${{ github.token }}
66+
- name: Docs upload
67+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
68+
with:
69+
name: docs
70+
path: envoy/generated/docs
71+
retention-days: 30

_docker/Dockerfile-docs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM envoyproxy/envoy-build:llvm-a3be5281b88359ab536d052218a30a951c97d751@sha256:5e29f02effdc49483d1e8bc3093c54ed54fa8821bb4aa228d7b2f9769647d18e
1+
FROM envoyproxy/envoy-build:devtools-86873047235e9b8232df989a5999b9bebf9db69c@sha256:6e7a82d4f1ba040f4ebef0c1aae00cdbd205ff7a1284c20cc20984fdfa4a91d8

docker-compose.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,23 @@ services:
1212
- "${PWD}/_docker/docs-entrypoint-extra.sh:/entrypoint-extra.sh"
1313
- "${HOME}/.cache/envoy/examples:/home/envoybuild/.cache"
1414
working_dir: /workspace/envoy
15-
command:
16-
- bash
17-
- -c
18-
- |
19-
./ci/do_ci.sh docs
2015
environment:
2116
DOCS_BUILD_RST: "${DOCS_BUILD_RST:-}"
2217
BAZEL_BUILD_EXTRA_OPTIONS: >-
2318
${BAZEL_BUILD_EXTRA_OPTIONS:-
24-
--override_repository=envoy_examples=../examples
25-
--@rules_python//python/config_settings:bootstrap_impl=script}
26-
BUILD_UID: "${UID:-1000}"
19+
--override_repository=envoy_examples=../examples}
20+
USER_UID: "${UID:-1000}"
2721
GITHUB_TOKEN: "${GITHUB_TOKEN:-}"
22+
entrypoint:
23+
- "/bin/bash"
24+
- "-c"
25+
- |
26+
set -e
27+
28+
sudo chown envoybuild:envoybuild /home/envoybuild/.cache
29+
sudo chown envoybuild:envoybuild /workspace/envoy
30+
sudo -EHs -u envoybuild bash -c "git config --global --add safe.directory /workspace/envoy && exec $0 $@"
31+
command: ["./ci/do_ci.sh", "docs"]
2832

2933
examples:
3034
build:

0 commit comments

Comments
 (0)