Skip to content

Commit

Permalink
Run docker build on commits, to prevent docker build from breaking in…
Browse files Browse the repository at this point in the history
… the future (#4978)
  • Loading branch information
ZackLK authored Aug 27, 2022
1 parent 172abd6 commit 854fc59
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .buildkite/pipeline-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,12 @@ steps:
- docker-compose#v3.0.0:
run: coverage-report
config: docker/buildkite/docker-compose.yml

- label: ":docker: build (no push)"
agents:
queue: "workers"
docker: "*"
command: "scripts/buildkite/docker-build.sh"
retry:
automatic:
limit: 1
11 changes: 11 additions & 0 deletions scripts/buildkite/docker-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -ex

echo "Building docker images for $BUILDKITE_MESSAGE"

docker build . -f Dockerfile -t ubercadence/server:master --build-arg TARGET=server
docker build . -f Dockerfile -t ubercadence/server:master-auto-setup --build-arg TARGET=auto-setup
docker build . -f Dockerfile -t ubercadence/cli:master --build-arg TARGET=cli
docker build . -f Dockerfile -t ubercadence/cadence-bench:master --build-arg TARGET=bench
docker build . -f Dockerfile -t ubercadence/cadence-canary:master --build-arg TARGET=canary
12 changes: 2 additions & 10 deletions scripts/buildkite/docker-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,11 @@ if [ "$BUILDKITE_COMMIT" != "$MASTER_SHA" ]; then
exit 0
fi

echo "Building docker image for $BUILDKITE_MESSAGE"
scripts/buildkite/docker-build.sh

docker build . -f Dockerfile -t ubercadence/server:master --build-arg TARGET=server
echo "Pushing docker images for $BUILDKITE_MESSAGE"
docker push ubercadence/server:master

docker build . -f Dockerfile -t ubercadence/server:master-auto-setup --build-arg TARGET=auto-setup
docker push ubercadence/server:master-auto-setup

docker build . -f Dockerfile -t ubercadence/cli:master --build-arg TARGET=cli
docker push ubercadence/cli:master

docker build . -f Dockerfile -t ubercadence/cadence-bench:master --build-arg TARGET=bench
docker push ubercadence/cadence-bench:master

docker build . -f Dockerfile -t ubercadence/cadence-canary:master --build-arg TARGET=canary
docker push ubercadence/cadence-canary:master

0 comments on commit 854fc59

Please sign in to comment.