Skip to content

Commit

Permalink
feat(CI): utilize the common build cache for container builds
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Jul 20, 2023
1 parent 6b337b0 commit 55398a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/deploy/build-deploy-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ build_image() {
local BUILD_ARGS_CMD=''
local LABEL_PARAMETER=''
local DISABLE_CACHE_PARAMETER=''
local CACHE='quay.io/cloudservices/build-cache'

if is_pr_or_mr_build; then
LABEL_PARAMETER=$(get_expiry_label_parameter)
Expand All @@ -252,7 +253,7 @@ build_image() {
fi

#shellcheck disable=SC2086
container_engine_cmd build --pull -f "$DOCKERFILE" $BUILD_ARGS_CMD $LABEL_PARAMETER \
container_engine_cmd build --cache-from="$CACHE" --cache-to="$CACHE" --pull -f "$DOCKERFILE" $BUILD_ARGS_CMD $LABEL_PARAMETER \
$DISABLE_CACHE_PARAMETER \
-t "${IMAGE_NAME}:${IMAGE_TAG}" .

Expand Down

0 comments on commit 55398a6

Please sign in to comment.