Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
che #14916 Release CI should build image based on the git commit hash…
Browse files Browse the repository at this point in the history
… (required for Hosted Che release cycle

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
  • Loading branch information
ibuziuk authored and monaka committed Nov 25, 2019
1 parent 1ed0385 commit ed03c90
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cico_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,19 @@ function build_and_push() {
fi
}

# Build release version of devfile registry, using ${TAG} as a tag. For release
# Build release version of devfile registry, using ${TAG} / ${GIT_COMMIT_TAG} as a tag. For release
# versions, the devfiles are rewritten to refer to ${TAG}-tagged images with the
# arbitrary user patch
function build_and_push_release() {
echo "CICO: building release '${TAG}' version of devfile registry"
echo "CICO: building release '${TAG}' / '${GIT_COMMIT_TAG}' version of devfile registry"
docker build -t ${IMAGE} -f ${DOCKERFILE_PATH} . \
--build-arg PATCHED_IMAGES_TAG=${TAG} \
--target registry

echo "CICO: '${GIT_COMMIT_TAG}' version of devfile registry built"
tag_push "${REGISTRY}/${ORGANIZATION}/${IMAGE}:${GIT_COMMIT_TAG}"
echo "CICO: '${GIT_COMMIT_TAG}' version of devfile registry pushed to '${REGISTRY}/${ORGANIZATION}' organization"

echo "CICO: release '${TAG}' version of devfile registry built"
tag_push "${REGISTRY}/${ORGANIZATION}/${IMAGE}:${TAG}"
echo "CICO: release '${TAG}' version of devfile registry pushed to '${REGISTRY}/${ORGANIZATION}' organization"
Expand Down

0 comments on commit ed03c90

Please sign in to comment.