Skip to content

Commit

Permalink
push image2 and image3 on tag only
Browse files Browse the repository at this point in the history
  • Loading branch information
thohng committed Sep 10, 2021
1 parent 74487c5 commit f2d6c63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
16 changes: 9 additions & 7 deletions crushftp-source/hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ elif [[ "${DOCKER_TAG}" =~ ^[0-9]+(.[0-9]+){0,3}(_[0-9]+)?$ ]] ; then
DOCKER_BUID="$DOCKER_BUID --build-arg CRUSHFTP_VERSION=$DOCKER_TAG"
fi

if [[ -n "${REPO2}" ]]; then
IMAGE_NAME2="${REPO2}:${DOCKER_TAG}"
DOCKER_BUID="$DOCKER_BUID -t $IMAGE_NAME2"
fi

if [[ -n "${IMAGE_NAME3}" ]]; then
DOCKER_BUID="$DOCKER_BUID -t $IMAGE_NAME3"
if [[ "${DOCKER_TAG}" =~ ^[0-9]+(.[0-9]+){0,3}(_[0-9]+)?$ ]] ; then
if [[ -n "${REPO2}" ]]; then
IMAGE_NAME2="${REPO2}:${DOCKER_TAG}"
DOCKER_BUID="$DOCKER_BUID -t $IMAGE_NAME2"
fi

if [[ -n "${IMAGE_NAME3}" ]]; then
DOCKER_BUID="$DOCKER_BUID -t $IMAGE_NAME3"
fi
fi

echo "Docker build=> ${DOCKER_BUID}"
Expand Down
16 changes: 9 additions & 7 deletions crushftp/hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ if [[ -n "${SOURCE}" ]]; then
DOCKER_BUID="$DOCKER_BUID --build-arg SOURCE=$SOURCE"
fi

if [[ -n "${REPO2}" ]]; then
IMAGE_NAME2="${REPO2}:${DOCKER_TAG}"
DOCKER_BUID="$DOCKER_BUID -t $IMAGE_NAME2"
fi

if [[ -n "${IMAGE_NAME3}" ]]; then
DOCKER_BUID="$DOCKER_BUID -t $IMAGE_NAME3"
if [[ "${DOCKER_TAG}" =~ ^[0-9]+(.[0-9]+){0,3}(_[0-9]+)?$ ]] ; then
if [[ -n "${REPO2}" ]]; then
IMAGE_NAME2="${REPO2}:${DOCKER_TAG}"
DOCKER_BUID="$DOCKER_BUID -t $IMAGE_NAME2"
fi

if [[ -n "${IMAGE_NAME3}" ]]; then
DOCKER_BUID="$DOCKER_BUID -t $IMAGE_NAME3"
fi
fi

echo "Docker build=> ${DOCKER_BUID}"
Expand Down

0 comments on commit f2d6c63

Please sign in to comment.