Skip to content

Commit

Permalink
PLATSD-188 separate push to ecr function
Browse files Browse the repository at this point in the history
  • Loading branch information
bbcnt committed Jun 28, 2023
1 parent d481771 commit e6f45a9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docker/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ create_git_tag() {
}

retag_and_push_image() {
IMAGE="${LOKALISE_REGISTRY}/${GIT_REPO_NAME}/${APP_NAME}"

log "Retaging image with ${IMAGE}:${TAG}"

docker pull ${IMAGE}:PRE-${GIT_BASE_BRANCH}
docker tag ${IMAGE}:PRE-${GIT_BASE_BRANCH} ${IMAGE}:${TAG}
docker tag ${IMAGE}:PRE-${GIT_BASE_BRANCH} ${IMAGE}:latest
docker push ${IMAGE}:${TAG}
docker push ${IMAGE}:latest
}

retag_and_push_image_ecr() {
IMAGE="${LOKALISE_ECR_REGISTRY}/${GIT_REPO_NAME}/${APP_NAME}"

log "Retaging ECR image with ${IMAGE}:${TAG}"
Expand Down Expand Up @@ -93,6 +105,7 @@ case ${action} in
git_tag)
create_git_tag
retag_and_push_image
retag_and_push_image_ecr
;;
git_release)
create_git_release
Expand Down

0 comments on commit e6f45a9

Please sign in to comment.