Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Attempt to fix by updating to use envoy-build-ubuntu #167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
references:
envoy-build-image: &envoy-build-image
envoyproxy/envoy-build:latest
envoyproxy/envoy-build-ubuntu:41c5a05d708972d703661b702a63ef5060125c33

version: 2
jobs:
build:
docker:
- image: *envoy-build-image
- image: *envoy-build-image
- entrypoint: ./ci/in_docker.sh
- environment:
HOST_UID: $UID
resource_class: xlarge
steps:
- checkout
- run: git submodule update --init
- run: ./ci/do_ci.sh build
- checkout
- run: git submodule update --init
- run: ./ci/do_ci.sh build
test:
docker:
- image: *envoy-build-image
- image: *envoy-build-image
resource_class: xlarge
steps:
- checkout
- run: git submodule update --init
- run: ./ci/do_ci.sh test
- checkout
- run: git submodule update --init
- run: ./ci/do_ci.sh test

workflows:
version: 2
all:
jobs:
- build
- test

23 changes: 23 additions & 0 deletions ci/in_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash -eu

set -o pipefail

apt-get -qq update -y
apt-get -qq install --no-install-recommends gosu

USER_UID="$HOST_UID"
USER_GID="${HOST_GID:-${HOST_UID}}"

DOCKER_GROUP_ARGS+=(--gid "${USER_GID}")
DOCKER_USER_ARGS+=(--gid "${USER_GID}")

groupadd ${DOCKER_GROUP_ARGS[*]} -f envoygroup
useradd -o --uid ${USER_UID} ${DOCKER_USER_ARGS[*]} --no-create-home --home-dir /build envoybuild
usermod -a -G pcap envoybuild
chown envoybuild:envoygroup /build
chown envoybuild /proc/self/fd/2
sudo -EHs -u envoybuild bash -c 'cd /source $*'

cd /source

gosu envoybuild "$@"