diff options
author | reivilibre <oliverw@matrix.org> | 2022-06-15 15:42:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-15 14:42:27 +0000 |
commit | 538044ac01696c1b55d0e60418bc9a6bc2b03411 (patch) | |
tree | 19c59af20fa4b07fde5336bf344c323312144445 /scripts-dev | |
parent | Track a histogram of state res durations (#13036) (diff) | |
download | synapse-538044ac01696c1b55d0e60418bc9a6bc2b03411.tar.xz |
Collapse Docker build commands in Complement CI runs to make the logs easier to read. (#13058)
Diffstat (limited to '')
-rwxr-xr-x | scripts-dev/complement.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts-dev/complement.sh b/scripts-dev/complement.sh index 52ef1fd07f..f1843717cb 100755 --- a/scripts-dev/complement.sh +++ b/scripts-dev/complement.sh @@ -24,6 +24,15 @@ # Exit if a line returns a non-zero exit code set -e + +# Helper to emit annotations that collapse portions of the log in GitHub Actions +echo_if_github() { + if [[ -n "$GITHUB_WORKFLOW" ]]; then + echo $* + fi +} + + # enable buildkit for the docker builds export DOCKER_BUILDKIT=1 @@ -41,14 +50,20 @@ if [[ -z "$COMPLEMENT_DIR" ]]; then fi # Build the base Synapse image from the local checkout +echo_if_github "::group::Build Docker image: matrixdotorg/synapse" docker build -t matrixdotorg/synapse -f "docker/Dockerfile" . +echo_if_github "::endgroup::" # Build the workers docker image (from the base Synapse image we just built). +echo_if_github "::group::Build Docker image: matrixdotorg/synapse-workers" docker build -t matrixdotorg/synapse-workers -f "docker/Dockerfile-workers" . +echo_if_github "::endgroup::" # Build the unified Complement image (from the worker Synapse image we just built). +echo_if_github "::group::Build Docker image: complement/Dockerfile" docker build -t complement-synapse \ -f "docker/complement/Dockerfile" "docker/complement" +echo_if_github "::endgroup::" export COMPLEMENT_BASE_IMAGE=complement-synapse |