-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Implementation details Pipelinerun creates pvc for the lifetime for object and uses that pvc as scratch space to transfer git resources between them. This information is passed to taskrun via resource paths. Paths are array of strings and incase of inouts these paths will be considered as new source of pipeline resource. In the case of outputs paths will be considered as new destination directory. - Update docs to include examples of paths Partially fixes #148
- Loading branch information
Shash Reddy
committed
Nov 29, 2018
1 parent
57367eb
commit 95a17ab
Showing
29 changed files
with
1,704 additions
and
258 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: pipeline.knative.dev/v1alpha1 | ||
kind: PipelineRun | ||
metadata: | ||
name: kritis-pipeline-pvc | ||
namespace: default | ||
spec: | ||
pipelineRef: | ||
name: kritis-pipeline-pvc | ||
triggerRef: | ||
type: manual | ||
resources: | ||
- name: create-file-kritis | ||
inputs: | ||
- name: workspace | ||
resourceRef: | ||
name: kritis-resources-git | ||
outputs: | ||
- name: workspace | ||
resourceRef: | ||
name: kritis-resources-git | ||
- name: check-kritis | ||
inputs: | ||
- name: workspace | ||
resourceRef: | ||
name: kritis-resources-git |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: pipeline.knative.dev/v1alpha1 | ||
kind: Task | ||
metadata: | ||
name: create-file | ||
namespace: default | ||
spec: | ||
inputs: | ||
resources: | ||
- name: workspace | ||
type: git | ||
targetPath: /damnworkspace | ||
outputs: | ||
resources: | ||
- name: workspace | ||
type: git | ||
steps: | ||
- name: read-docs-old | ||
image: ubuntu | ||
command: ["/bin/bash"] | ||
args: ['-c', 'ls -la /workspace/damnworkspace/docs/install.md'] # tests that targetpath works | ||
- name: write-new-stuff | ||
image: ubuntu | ||
command: ['bash'] | ||
args: ['-c', 'echo some stuff > /workspace/damnworkspace/stuff'] | ||
|
||
--- | ||
apiVersion: pipeline.knative.dev/v1alpha1 | ||
kind: Task | ||
metadata: | ||
name: check-stuff-file-exists | ||
namespace: default | ||
spec: | ||
inputs: | ||
resources: | ||
- name: workspace | ||
type: git | ||
targetPath: /newworkspace | ||
steps: | ||
- name: read | ||
image: ubuntu | ||
command: ["/bin/bash"] | ||
args: ['-c', 'cat /workspace/newworkspace/stuff'] # tests that new targetpath and previous task output is dumped |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: pipeline.knative.dev/v1alpha1 | ||
kind: Pipeline | ||
metadata: | ||
name: kritis-pipeline-pvc | ||
namespace: default | ||
spec: | ||
tasks: | ||
- name: create-file-kritis # 1. create file | ||
taskRef: | ||
name: create-file | ||
- name: check-kritis # 2. check file exists | ||
taskRef: | ||
name: check-stuff-file-exists | ||
resources: | ||
- name: workspace | ||
providedBy: [create-file-kritis] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,4 @@ spec: | |
- name: token | ||
value: eyJhbGciOiJ..... | ||
- name: username | ||
value: admin | ||
value: admin |
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
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
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
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
Oops, something went wrong.