diff --git a/docs/changes/DM-54126.misc.md b/docs/changes/DM-54126.misc.md new file mode 100644 index 00000000..e10a8930 --- /dev/null +++ b/docs/changes/DM-54126.misc.md @@ -0,0 +1 @@ +Change to use shared buildx builder instead of recreating for each build. diff --git a/tap-schema/build b/tap-schema/build index e87bf08e..cbaa2ea3 100755 --- a/tap-schema/build +++ b/tap-schema/build @@ -45,13 +45,13 @@ do schema_index=$((schema_index+1)) done -# Build and push docker images -docker buildx create --name tap-schema --driver docker-container \ - --platform linux/amd64 --platform linux/arm64 +# Build and push docker image, creating the builder if it doesn't exist +docker buildx inspect tap-schema >/dev/null 2>&1 || \ + docker buildx create --name tap-schema --driver docker-container \ + --platform linux/amd64 --platform linux/arm64 docker buildx build --push --builder tap-schema --progress plain \ --platform linux/amd64 --platform linux/arm64 \ --tag lsstsqre/tap-schema-$ENVIRONMENT:$GIT_TAG . -docker buildx rm tap-schema echo "Pushed Docker image: lsstsqre/tap-schema-$ENVIRONMENT:$GIT_TAG" diff --git a/tap-schema/build-all b/tap-schema/build-all index bb9e6603..fedb2154 100755 --- a/tap-schema/build-all +++ b/tap-schema/build-all @@ -3,6 +3,11 @@ # NB: The order of files in the ./build statements controls the TAP_SCHEMA.schemas.schema_index # values that control the presentation order of schemas. This is respected by the Portal Aspect. # + +# Create a shared buildx builder +docker buildx create --name tap-schema --driver docker-container \ + --platform linux/amd64 --platform linux/arm64 + ./build mock # TAP services based on production Qserv at USDF: @@ -29,3 +34,5 @@ FELIS_UNIQUE_KEYS=1 ./build usdf-dev-cdb ../yml/{cdb,efd}_*.yaml FELIS_UNIQUE_KEYS=1 ./build usdf-prod-cdb ../yml/{cdb,efd}_*.yaml + +docker buildx rm tap-schema