1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-29 06:34:08 +00:00

Add persistent volume claim for cache

Signed-off-by: Natalie Arellano <narellano@vmware.com>
This commit is contained in:
Natalie Arellano 2020-02-25 15:24:55 -06:00 committed by tekton-robot
parent cd8daf35c6
commit 61577e34ec
2 changed files with 44 additions and 19 deletions

View File

@ -0,0 +1,33 @@
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: buildpacks-samples
spec:
type: git
params:
- name: url
value: https://github.com/buildpacks/samples
- name: revision
value: master
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: buildpacks-app-image
spec:
type: image
params:
- name: url
value: localhost:5000/buildpacks-app
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: buildpacks-cache-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi

View File

@ -6,33 +6,25 @@ metadata:
spec:
taskRef:
name: buildpacks-v3
# Uncomment the lines below to use an existing cache
# podTemplate:
# volumes:
# - name: my-cache
# persistentVolumeClaim:
# claimName: task-pv-claim
podTemplate:
volumes:
- name: buildpacks-cache
persistentVolumeClaim:
claimName: buildpacks-cache-pvc
inputs:
resources:
- name: source
resourceSpec:
type: git
params:
- name: url
value: https://github.com/buildpacks/samples
resourceRef:
name: buildpacks-samples
params:
- name: SOURCE_SUBPATH
value: apps/java-maven
- name: BUILDER_IMAGE
value: cnbs/sample-builder:alpine-p0.2
# Uncomment the lines below to use an existing cache
# - name: CACHE
# value: my-cache
- name: CACHE
value: buildpacks-cache
outputs:
resources:
- name: image
resourceSpec:
type: image
params:
- name: url
value: localhost:5000/test-app
resourceRef:
name: buildpacks-app-image