Skip to content

Commit

Permalink
ci: Attempt to fix by updating to use envoy-build-ubuntu
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax committed May 28, 2023
1 parent c20cc85 commit 3c59444
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 10 deletions.
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 "$@"

0 comments on commit 3c59444

Please sign in to comment.