Skip to content
Snippets Groups Projects
Commit 6bf4b9f8 authored by Roang's avatar Roang
Browse files

Add kaniko warmup

With this the kaniko will no longer pull the base image for every build,
but instead use the local cache.
parent 5258ae46
Branches
Tags
No related merge requests found
...@@ -53,6 +53,22 @@ default: ...@@ -53,6 +53,22 @@ default:
SSO_SECRET_GENERATE: "True" SSO_SECRET_GENERATE: "True"
STORAGE_TYPE: local STORAGE_TYPE: local
# Warm up the local image cache
# Will throw a warning for local stages, but that's fine
warmup:
stage: prepare
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
cache:
paths:
- "$CI_PROJECT_DIR/.cache/kaniko"
script:
- /kaniko/warmer --cache-dir=$CI_PROJECT_DIR/.cache/kaniko -d Dockerfile
rules:
- when: always
# Kaniko build setup # Kaniko build setup
.build: .build:
image: image:
...@@ -90,6 +106,8 @@ generate_css: ...@@ -90,6 +106,8 @@ generate_css:
meta_build: meta_build:
stage: prepare stage: prepare
extends: .build extends: .build
needs:
- warmup
variables: variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
script: script:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment