Last active
November 6, 2019 03:26
-
-
Save bobcatfish/4141ab3fdbcb1aa5f8f27c0f6714bdff to your computer and use it in GitHub Desktop.
Attempted example of desired subpath use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: tekton.dev/v1alpha1 | |
kind: Task | |
metadata: | |
name: make-stuff | |
spec: | |
params: | |
- name: message | |
steps: | |
- name: doit | |
image: alpine | |
command: ["/bin/sh", "-c"] | |
args: | |
- echo $(params.message) > $(workspaces.path)/message; | |
workspaces: | |
- name: messages | |
description: the folder where we write the message to | |
--- | |
apiVersion: tekton.dev/v1alpha1 | |
kind: Task | |
metadata: | |
name: read-messages | |
spec: | |
steps: | |
- name: doit | |
image: alpine | |
script: | | |
#!/usr/bin/env bash | |
cat $(workspaces.mailbox)/hello/message | |
cat $(workspaces.mailbox)/world/message | |
workspaces: | |
- name: mailbox | |
description: the folder containing the hello and world folders | |
--- | |
apiVersion: tekton.dev/v1alpha1 | |
kind: Pipeline | |
metadata: | |
name: volumes-forevah | |
spec: | |
volumes: | |
- name: the-volume | |
description: the volume to put everything on | |
tasks: | |
- name: write-hello | |
taskRef: | |
name: make-stuff | |
inputs: | |
params: | |
- name: message | |
value: hello | |
workspaces: | |
- name: messages | |
volume: the-volume | |
subPath: /hello | |
- name: write-world | |
taskRef: | |
name: make-stuff-world | |
inputs: | |
params: | |
- name: message | |
value: world | |
workspaces: | |
name: messages | |
volume: the-volume | |
subPath: /world | |
- name: read-it-all | |
runAfter: [write-hello, write-world] | |
taskRef: | |
name: read-messages | |
workspaces: | |
name: mailbox | |
volume: the-volume | |
subPath: / | |
--- | |
apiVersion: tekton.dev/v1alpha1 | |
kind: PipelineRun | |
metadata: | |
name: volumes-forevah-run | |
spec: | |
pipelineRef: | |
name: volumes-forevah | |
volumes: | |
- name: the-volume | |
persistentVolumeClaim: | |
- name: my-pvc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment