Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
chore(bug): be more verbose (-x) and fail if error code... (#363)
Browse files Browse the repository at this point in the history
* be more verbose (-x) and fail if error code > 0 occurs (-e) when doing docker buildx or arbitrary-users-patch scripts

Change-Id: I2519add533d0fa6fc8f4c1f1c121a4fdf867b5ae
Signed-off-by: nickboldt <nboldt@redhat.com>

* arbitrary-users-patch/happy-path/build_happy_path_image.sh and arbitrary-users-patch/happy-path/build_happy_path_image.sh alreadt do an inline 'set -e'

Change-Id: I6746ebad224ae301019d5e42f9c9aea7989b4ab5
Signed-off-by: nickboldt <nboldt@redhat.com>

* why /bin/bash foo when you can just ./foo ?

Change-Id: If72badd6fe7014291b200e0e08a7a2651bcc3e8a
Signed-off-by: nickboldt <nboldt@redhat.com>
  • Loading branch information
nickboldt authored Apr 1, 2021
1 parent 65a109f commit ee4dbcb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nightly-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ jobs:
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push base images
run: /bin/bash arbitrary-users-patch/build_images.sh --push
run: ./arbitrary-users-patch/build_images.sh --push

- name: Build and push happy path image
run: /bin/bash arbitrary-users-patch/happy-path/build_happy_path_image.sh --push
run: ./arbitrary-users-patch/happy-path/build_happy_path_image.sh --push
-
name: "Build and push"
uses: docker/build-push-action@v2
Expand Down
8 changes: 6 additions & 2 deletions make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ usage ()

performRelease()
{
set -xe

#Build and push patched base images and happy path image
TAG=$(head -n 1 VERSION)
export TAG
/bin/bash arbitrary-users-patch/happy-path/build_happy_path_image.sh --push
/bin/bash arbitrary-users-patch/build_images.sh --push
./arbitrary-users-patch/happy-path/build_happy_path_image.sh --push
./arbitrary-users-patch/build_images.sh --push

#Build and push images
PLATFORMS="$(cat PLATFORMS)"
Expand All @@ -42,6 +44,8 @@ performRelease()
SHORT_SHA1=$(git rev-parse --short HEAD)
DOCKERFILE_PATH=./build/dockerfiles/Dockerfile
docker buildx build --push --platform "${PLATFORMS}" --tag "${REGISTRY}/${ORGANIZATION}/${IMAGE}:${VERSION}" --tag "${REGISTRY}/${ORGANIZATION}/${IMAGE}:${SHORT_SHA1}" -f ${DOCKERFILE_PATH} --build-arg PATCHED_IMAGES_TAG="${VERSION}" --target registry .

set +xe
}

if [[ ! ${VERSION} ]]; then
Expand Down

0 comments on commit ee4dbcb

Please sign in to comment.