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
14 changes: 13 additions & 1 deletion ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,24 @@ For a release version of the Envoy binary you can run:
./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.release.server_only'
```

The artifacts can be found in `/tmp/envoy-docker-build/envoy/source/exe/envoy` (or wherever
The build artifact can be found in `/tmp/envoy-docker-build/envoy/source/exe/envoy` (or wherever
`$ENVOY_DOCKER_BUILD_DIR` points).

For a debug version of the Envoy binary you can run:

```bash
./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.debug.server_only'
```

The build artifact can be found in `/tmp/envoy-docker-build/envoy/source/exe/envoy-debug` (or wherever
`$ENVOY_DOCKER_BUILD_DIR` points).

The `./ci/run_envoy_docker.sh './ci/do_ci.sh <TARGET>'` targets are:


* `bazel.asan` &mdash; build and run tests under `-c dbg --config=clang-asan` with clang-5.0.
* `bazel.debug` &mdash; build Envoy static binary and run tests under `-c dbg`.
* `bazel.debug.server_only` &mdash; build Envoy static binary under `-c dbg`.
* `bazel.dev` &mdash; build Envoy static binary and run tests under `-c fastbuild` with gcc-4.9.
* `bazel.release` &mdash; build Envoy static binary and run tests under `-c opt` with gcc-4.9.
* `bazel.release.server_only` &mdash; build Envoy static binary under `-c opt` with gcc-4.9.
Expand Down
23 changes: 22 additions & 1 deletion ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,23 @@ function bazel_release_binary_build() {
cd "${ENVOY_CI_DIR}"
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c opt //source/exe:envoy-static.stripped.stamped
# Copy the envoy-static binary somewhere that we can access outside of the
# container for building Docker images.
# container.
cp -f \
"${ENVOY_CI_DIR}"/bazel-genfiles/source/exe/envoy-static.stripped.stamped \
"${ENVOY_DELIVERY_DIR}"/envoy
}

function bazel_debug_binary_build() {
echo "Building..."
cd "${ENVOY_CI_DIR}"
bazel --batch build ${BAZEL_BUILD_OPTIONS} -c dbg //source/exe:envoy-static.stamped
# Copy the envoy-static binary somewhere that we can access outside of the
# container.
cp -f \
"${ENVOY_CI_DIR}"/bazel-genfiles/source/exe/envoy-static.stamped \
"${ENVOY_DELIVERY_DIR}"/envoy-debug
}

if [[ "$1" == "bazel.release" ]]; then
setup_gcc_toolchain
echo "bazel release build with tests..."
Expand All @@ -30,6 +41,16 @@ elif [[ "$1" == "bazel.release.server_only" ]]; then
echo "bazel release build..."
bazel_release_binary_build
exit 0
elif [[ "$1" == "bazel.debug" ]]; then
echo "bazel debug build with tests..."
bazel_debug_binary_build
echo "Testing..."
bazel --batch test ${BAZEL_TEST_OPTIONS} -c dbg //test/...
exit 0
elif [[ "$1" == "bazel.debug.server_only" ]]; then
echo "bazel debug build..."
bazel_debug_binary_build
exit 0
elif [[ "$1" == "bazel.asan" ]]; then
setup_clang_toolchain
echo "bazel ASAN/UBSAN debug build with tests..."
Expand Down