Skip to content

Commit

Permalink
Make pushing the CI image optional
Browse files Browse the repository at this point in the history
Also stop script on error.

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
  • Loading branch information
nicolasbock committed May 6, 2020
1 parent ff38372 commit 586e9d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions refresh-ci-images.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/bin/bash

set -x
set -x -e

: ${IMAGE_TAG:=bml-ci}
: ${IMAGE_VERSION:=2}
: ${PUSH_IMAGE:=no}

for workflow in build lint docs; do
docker build --tag nicolasbock/${IMAGE_TAG}-${workflow}:${IMAGE_VERSION} ci-images/${workflow}
docker push nicolasbock/${IMAGE_TAG}-${workflow}:${IMAGE_VERSION}
if [[ ${PUSH_IMAGE} = yes ]]; then
docker push nicolasbock/${IMAGE_TAG}-${workflow}:${IMAGE_VERSION}
fi
done

0 comments on commit 586e9d9

Please sign in to comment.