diff --git a/docker/chains/build-docker-chains.sh b/docker/chains/build-docker-chains.sh index 8295634c..e86a6412 100755 --- a/docker/chains/build-docker-chains.sh +++ b/docker/chains/build-docker-chains.sh @@ -4,6 +4,7 @@ DOCKER_REPO=${DOCKER_REPO:=anmol1696} # Set default values for boolean arguments PUSH=0 PUSH_LATEST=0 +FORCE=0 set -euo pipefail @@ -39,13 +40,17 @@ build_chain_tag() { local base=$(yq -r ".chains[] | select(.name==\"$chain\") | .base" versions.yaml) - # Push docker image, if feature flags set - local buildx_args="" - if [[ "$push_image" == "push" || "$push_image" == "push-only" ]]; then + if [[ "$FORCE" -ne 1 ]]; then if image_tag_exists $DOCKER_REPO/$chain $tag; then color yellow "image $DOCKER_REPO/$chain:$tag already exists, skipping docker build" return 0 fi + color green "image not found remote, will build docker image $DOCKER_REPO/$chain:$tag" + fi + + # Push docker image, if feature flags set + local buildx_args="" + if [[ "$push_image" == "push" || "$push_image" == "push-only" ]]; then color green "will pushing docker image $DOCKER_REPO/$chain:$tag" buildx_args="--push" fi @@ -112,6 +117,10 @@ while [ $# -gt 0 ]; do PUSH="push-only" shift # past argument ;; + --force) + FORCE=1 + shift # past argument + ;; -*|--*) echo "Unknown option $1" exit 1 diff --git a/docker/faucet/cosmjs-faucet/versions.yaml b/docker/faucet/cosmjs-faucet/versions.yaml index ad74545f..644f48ad 100644 --- a/docker/faucet/cosmjs-faucet/versions.yaml +++ b/docker/faucet/cosmjs-faucet/versions.yaml @@ -1,5 +1,7 @@ base: node:16-alpine versions: + - v0.31.0-alpha.2 + - v0.31.0-alpha.1 - v0.30.1 - v0.30.0 - v0.29.5 diff --git a/scripts/build-docker.sh b/scripts/build-docker.sh index 0e310751..96626c01 100755 --- a/scripts/build-docker.sh +++ b/scripts/build-docker.sh @@ -5,6 +5,7 @@ DOCKER_REPO=${DOCKER_REPO:=anmol1696} # Set default values for boolean arguments PUSH=0 PUSH_LATEST=0 +FORCE=0 DOCKER_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/../docker" @@ -66,13 +67,17 @@ docker_process_build() { exit 1 fi - # Push docker image, if feature flags set - local buildx_args="" - if [[ "$push_image" == "push" || "$push_image" == "push-only" ]]; then + if [[ "$FORCE" -ne 1 ]]; then if image_tag_exists $DOCKER_REPO/$process $tag; then color yellow "image $DOCKER_REPO/$process:$tag already exists, skipping docker build" return 0 fi + color green "image not found remote, will build docker image $DOCKER_REPO/$process:$tag" + fi + + # Push docker image, if feature flags set + local buildx_args="" + if [[ "$push_image" == "push" || "$push_image" == "push-only" ]]; then color green "will pushing docker image $DOCKER_REPO/$process:$tag" buildx_args="--push" fi @@ -167,6 +172,10 @@ while [ $# -gt 0 ]; do PUSH_LATEST="latest" shift # past argument ;; + --force) + FORCE=1 + shift # past argument + ;; -*|--*) echo "Unknown option $1" exit 1