Skip to content

Commit 3c59444

Browse files
committed
ci: Attempt to fix by updating to use envoy-build-ubuntu
Signed-off-by: Ryan Northey <[email protected]>
1 parent c20cc85 commit 3c59444

File tree

2 files changed

+35
-10
lines changed

2 files changed

+35
-10
lines changed

.circleci/config.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11
references:
22
envoy-build-image: &envoy-build-image
3-
envoyproxy/envoy-build:latest
3+
envoyproxy/envoy-build-ubuntu:41c5a05d708972d703661b702a63ef5060125c33
44

55
version: 2
66
jobs:
77
build:
88
docker:
9-
- image: *envoy-build-image
9+
- image: *envoy-build-image
10+
- entrypoint: ./ci/in_docker.sh
11+
- environment:
12+
HOST_UID: $UID
1013
resource_class: xlarge
1114
steps:
12-
- checkout
13-
- run: git submodule update --init
14-
- run: ./ci/do_ci.sh build
15+
- checkout
16+
- run: git submodule update --init
17+
- run: ./ci/do_ci.sh build
1518
test:
1619
docker:
17-
- image: *envoy-build-image
20+
- image: *envoy-build-image
1821
resource_class: xlarge
1922
steps:
20-
- checkout
21-
- run: git submodule update --init
22-
- run: ./ci/do_ci.sh test
23+
- checkout
24+
- run: git submodule update --init
25+
- run: ./ci/do_ci.sh test
2326

2427
workflows:
2528
version: 2
2629
all:
2730
jobs:
2831
- build
2932
- test
30-

ci/in_docker.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash -eu
2+
3+
set -o pipefail
4+
5+
apt-get -qq update -y
6+
apt-get -qq install --no-install-recommends gosu
7+
8+
USER_UID="$HOST_UID"
9+
USER_GID="${HOST_GID:-${HOST_UID}}"
10+
11+
DOCKER_GROUP_ARGS+=(--gid "${USER_GID}")
12+
DOCKER_USER_ARGS+=(--gid "${USER_GID}")
13+
14+
groupadd ${DOCKER_GROUP_ARGS[*]} -f envoygroup
15+
useradd -o --uid ${USER_UID} ${DOCKER_USER_ARGS[*]} --no-create-home --home-dir /build envoybuild
16+
usermod -a -G pcap envoybuild
17+
chown envoybuild:envoygroup /build
18+
chown envoybuild /proc/self/fd/2
19+
sudo -EHs -u envoybuild bash -c 'cd /source $*'
20+
21+
cd /source
22+
23+
gosu envoybuild "$@"

0 commit comments

Comments
 (0)