Skip to content
Merged
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
2 changes: 1 addition & 1 deletion ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Two flavors of Envoy Docker images, based on Ubuntu and Alpine Linux, are built.

## Ubuntu envoy image
The Ubuntu based Envoy Docker image at [`lyft/envoy-build:<hash>`](https://hub.docker.com/r/lyft/envoy-build/) is used for Travis CI checks,
where `<hash>` is specified in [ci_steps.sh](https://github.com/lyft/envoy/blob/master/ci/ci_steps.sh). Developers
where `<hash>` is specified in [`envoy_build_sha.sh`](https://github.com/lyft/envoy/blob/master/ci/envoy_build_sha.sh). Developers
may work with `lyft/envoy-build:latest` to provide a self-contained environment for building Envoy binaries and
running tests that reflects the latest built Ubuntu Envoy image. Moreover, the Docker image
at [`lyft/envoy:<hash>`](https://hub.docker.com/r/lyft/envoy/) is an image that has an Envoy binary at `/usr/local/bin/envoy`. The `<hash>`
Expand Down
4 changes: 2 additions & 2 deletions ci/build_container/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ checks if the commit has changed the `ci/build_container` directory. If there ar
image. The image is pushed to dockerhub under `latest` and under the commit sha.

After the PR that changes `ci/build_container` has been merged, and the new image gets pushed,
a second PR is needed to update `ci/ci_steps.sh`. In order to pull the new tagged version of
the build image, change ENVOY_BUILD_SHA [here](https://github.com/lyft/envoy/blob/master/ci/ci_steps.sh#L2). Any PRs that depend on this image change will have to merge master after the change to ci/ci_steps.sh has been merged to master.
a second PR is needed to update `ci/envoy_build_sha.sh`. In order to pull the new tagged version of
the build image, change ENVOY_BUILD_SHA [here](https://github.com/lyft/envoy/blob/master/ci/envoy_build_sha.sh). Any PRs that depend on this image change will have to merge master after the change to `ci/envoy_build_sha.sh` has been merged to master.
3 changes: 2 additions & 1 deletion ci/ci_steps.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
ENVOY_BUILD_SHA=cd7f513444fb24270175f0c961996d184b764f32

# Script that lists all the steps take by the CI system when doing Envoy builds.
set -e

. ./ci/envoy_build_sha.sh

# Lint travis file.
travis lint .travis.yml --skip-completion-check

Expand Down
1 change: 1 addition & 0 deletions ci/envoy_build_sha.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENVOY_BUILD_SHA=cd7f513444fb24270175f0c961996d184b764f32
13 changes: 6 additions & 7 deletions ci/run_envoy_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

. ci/envoy_build_sha.sh

# When running docker on a Mac, root user permissions are required.
if [[ "$OSTYPE" == "darwin"* ]]; then
USER=root
Expand All @@ -11,15 +13,12 @@ else
USER_GROUP=$(id -g)
fi

# The IMAGE_ID can be set to an arbitrary image ID (found with 'docker images').
[[ -z "${IMAGE_ID}" ]] && IMAGE_ID="latest"
# The IMAGE_ID defaults to the CI hash but can be set to an arbitrary image ID (found with 'docker
# images').
[[ -z "${IMAGE_ID}" ]] && IMAGE_ID="${ENVOY_BUILD_SHA}"
[[ -z "${ENVOY_DOCKER_BUILD_DIR}" ]] && ENVOY_DOCKER_BUILD_DIR=/tmp/envoy-docker-build

mkdir -p "${ENVOY_DOCKER_BUILD_DIR}"
# When not operating on an existing image ID, fetch latest.
if [[ "${IMAGE_ID}" == "latest" ]]
then
docker pull lyft/envoy-build:latest
fi
# Since we specify an explicit hash, docker-run will pull from the remote repo if missing.
docker run -t -i -u "${USER}":"${USER_GROUP}" -v "${ENVOY_DOCKER_BUILD_DIR}":/build \
-v "$PWD":/source lyft/envoy-build:"${IMAGE_ID}" /bin/bash -c "cd source && $*"