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

Modified script to exit with error when there's an error building the new image, instead of continuing willy-nilly #12

Merged
merged 1 commit into from
Oct 27, 2024
Merged
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
4 changes: 3 additions & 1 deletion mariadb-image-builder
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,11 @@ done
# BACKUP_IMAGE_TAG is optional and will default to `backup-${date}`
# these have to be the same base `mariadb` version to work (ie mariadb:10.6 as the builder, and uselagoon/mariadb-10.6-drupal:latest as the clean resulting image)

# build the image
# build the image, but exit on error
ln -s mariadb.Dockerfile Dockerfile
set -o errexit
docker build --network=host --build-arg BUILDER_IMAGE="${BUILDER_IMAGE_NAME}" --build-arg CLEAN_IMAGE="${BUILDER_CLEAN_IMAGE_NAME}" -t ${backup_image_full} -t "${BUILDER_BACKUP_IMAGE_NAME}:latest" .
set +o errexit

##### Phase 4: Save new container to registry

Expand Down
Loading