Commit e7a4eff2 authored by Richard Crosby's avatar Richard Crosby
Browse files

feat(cache): enable proper layer caching

parent 15c870fc
Pipeline #18132 passed with stages
in 49 seconds
......@@ -28,8 +28,10 @@ build_image:
- 'echo BBK_RUNTIME_ENVIRONMENT: $BBK_RUNTIME_ENVIRONMENT'
# Build and push image
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG || true
- docker build --cache-from $CI_REGISTRY_IMAGE:$TAG --tag $CI_REGISTRY_IMAGE:$TAG --build-arg BBK_RUNTIME_ENVIRONMENT=${BBK_RUNTIME_ENVIRONMENT} --build-arg COMMIT_SHA=$CI_COMMIT_SHORT_SHA .
- docker pull $CI_REGISTRY_IMAGE:$TAG-builder || true
- docker build --cache-from $CI_REGISTRY_IMAGE:$TAG-builder --tag $CI_REGISTRY_IMAGE:$TAG-builder --target build .
- docker build --cache-from $CI_REGISTRY_IMAGE:$TAG-builder --tag $CI_REGISTRY_IMAGE:$TAG .
- docker push $CI_REGISTRY_IMAGE:$TAG-builder
- docker push $CI_REGISTRY_IMAGE:$TAG
except:
refs:
......@@ -39,11 +41,4 @@ build_image:
- $CI_COMMIT_MESSAGE =~ /\[ci-release\]/
tags:
- docker
# skip artifacts and cache download for this job
dependencies: []
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- node_modules/
- cache/Cypress
policy: pull
cache: {}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment