Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Default build cache to an empty dir #36

Merged
merged 1 commit into from
Mar 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions riff-cnb-clusterbuildtemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ spec:
- name: GROUP_ID
description: The group ID of the builder image user
default: "1000"
- name: CACHE_VOLUME
description: The name of the PersistentVolumeClaim to use for the build cache.
- name: CACHE
description: The name of the volume to use for the build cache.
default: empty-dir
steps:
- name: prepare
image: ubuntu:18.04
Expand All @@ -49,7 +50,7 @@ spec:
echo "handler = '${FUNCTION_HANDLER}'" >> /workspace/riff.toml &&
echo "override = '${FUNCTION_LANGUAGE}'" >> /workspace/riff.toml
volumeMounts:
- name: cache
- name: ${CACHE}
mountPath: /layers
imagePullPolicy: Always
- name: detect
Expand All @@ -60,7 +61,7 @@ spec:
- "-group=/layers/group.toml"
- "-plan=/layers/plan.toml"
volumeMounts:
- name: cache
- name: ${CACHE}
mountPath: /layers
imagePullPolicy: Always
- name: analyze
Expand All @@ -72,7 +73,7 @@ spec:
- "-group=/layers/group.toml"
- "${IMAGE}"
volumeMounts:
- name: cache
- name: ${CACHE}
mountPath: /layers
imagePullPolicy: Always
- name: build
Expand All @@ -84,7 +85,7 @@ spec:
- "-group=/layers/group.toml"
- "-plan=/layers/plan.toml"
volumeMounts:
- name: cache
- name: ${CACHE}
mountPath: /layers
imagePullPolicy: Always
- name: export
Expand All @@ -98,10 +99,9 @@ spec:
- "-group=/layers/group.toml"
- "${IMAGE}"
volumeMounts:
- name: cache
- name: ${CACHE}
mountPath: /layers
imagePullPolicy: Always
volumes:
- name: cache
persistentVolumeClaim:
claimName: ${CACHE_VOLUME}
- name: empty-dir
emptyDir: {}