Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run docker build on commits, to prevent docker build from breaking in the future #4978

Merged
merged 1 commit into from
Aug 27, 2022
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
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