services: # assumes you have envoy checked out - docs are built in envoy workspace docs: build: context: . dockerfile: _docker/Dockerfile-docs depends_on: - html volumes: - "${PWD}/../envoy:/workspace/envoy" - "${PWD}:/workspace/examples" - "${PWD}/_docker/docs-entrypoint-extra.sh:/entrypoint-extra.sh" - "${HOME}/.cache/envoy/examples:/home/envoybuild/.cache" working_dir: /workspace/envoy environment: DOCS_BUILD_RST: "${DOCS_BUILD_RST:-}" BAZEL_BUILD_EXTRA_OPTIONS: >- --override_repository=envoy-example-filter-cc+=../../examples/filter-cc --override_repository=envoy-example-wasm-cc+=../../examples/wasm-cc --override_repository=envoy-examples+=../../examples USER_UID: "${UID:-1000}" GROUP_UID: "${GID:-1000}" GITHUB_TOKEN: "${GITHUB_TOKEN:-}" entrypoint: - "/bin/bash" - "-c" - | set -e usermod -u "$$USER_UID" envoybuild groupmod -g "$$GROUP_UID" envoybuild chown envoybuild:envoybuild /home/envoybuild/.cache chown envoybuild:envoybuild /workspace/envoy # This is only there already when `html` has been started, which mounts it. mkdir -p /workspace/envoy/generated/docs chown envoybuild:envoybuild /workspace/envoy/generated chown envoybuild:envoybuild /workspace/envoy/generated/docs exec sudo -EH -u envoybuild "$@" - "--" command: - /bin/bash - -c - | set -e git config --global --add safe.directory /workspace/envoy exec ./ci/do_ci.sh docs examples: build: context: . dockerfile: _docker/Dockerfile-examples privileged: true cgroup: host volumes: - "${PWD}/../envoy:/workspace/envoy" - "${PWD}:/workspace/examples" - "${PWD}/_docker/examples-entrypoint-extra.sh:/entrypoint-extra.sh" - "${PWD}/_docker/examples-cleanup.sh:/cleanup.sh" - "${HOME}/.cache/envoy/examples:/home/envoybuild/.cache" - "${DOCKER_EXAMPLES_LIB:-/var/lib/docker-examples}:/var/lib/docker" - "${DOCKER_EXAMPLES_LOG:-/var/log/docker-examples}:/var/log/docker" working_dir: /workspace/examples environment: BAZEL_BUILD_EXTRA_OPTIONS: "${BAZEL_BUILD_EXTRA_OPTIONS:-}" USER_UID: "${UID:-1000}" GROUP_UID: "${UID:-1000}" GITHUB_TOKEN: "${GITHUB_TOKEN:-}" ENVOY_VERSION: "${ENVOY_VERSION:-}" DOCKER_BUILDKIT: "${DOCKER_BUILDKIT:-1}" COMPOSE_BAKE: "${COMPOSE_BAKE:-true}" BUILDKIT_PROGRESS: "${BUILDKIT_PROGRESS:-quiet}" command: - bash - -c - | # A cached pass is only for the Envoy images that it was run with ENVOY_FLAGS="$$(tools/envoy_flags.sh)" || exit 1 bazel test ${BAZEL_BUILD_EXTRA_OPTIONS} $$ENVOY_FLAGS --config=examples --keep_going --test_output=errors //:verify_examples html: image: nginx volumes: - "${PWD}/../envoy/generated/docs:/usr/share/nginx/html" ports: - "9090:80"