Skip to content

Commit

Permalink
add 0.31.0 to the faucet version (#129)
Browse files Browse the repository at this point in the history
* add 0.31.0 to the faucet version

* skip building image if version exists, add --force args to force build
  • Loading branch information
Anmol1696 committed Jun 18, 2023
1 parent 5582a4f commit f9d7289
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
15 changes: 12 additions & 3 deletions docker/chains/build-docker-chains.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docker/faucet/cosmjs-faucet/versions.yaml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 12 additions & 3 deletions scripts/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f9d7289

Please sign in to comment.