-
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.
Adding support to enable resourceSpec
Its now possible to embed the resource specifications into Pipeline Run using resourceSpec, for example: apiVersion: tekton.dev/v1alpha1 kind: PipelineRun metadata: name: pipelinerun-echo-greetings spec: resources: - name: git-repo resourceRef: name: my-git-repo Can be specified as: apiVersion: tekton.dev/v1alpha1 kind: PipelineRun name: pipelinerun-echo-greetings spec: resources: - name: git-repo resourceSpec: type: git params: - name: url value: https://github.com/myrepo/myrepo.git
- Loading branch information
1 parent
454ddec
commit a3f0f92
Showing
9 changed files
with
246 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: Task | ||
metadata: | ||
name: task-to-list-files | ||
spec: | ||
inputs: | ||
resources: | ||
- name: pipeline-git | ||
type: git | ||
outputs: | ||
resources: | ||
- name: pipeline-git | ||
type: git | ||
steps: | ||
- name: list | ||
image: ubuntu | ||
command: | ||
- bash | ||
args: | ||
- -c | ||
- | | ||
ls -al $(inputs.resources.pipeline-git.path) | ||
--- | ||
|
||
apiVersion: tekton.dev/v1alpha1 | ||
kind: Pipeline | ||
metadata: | ||
name: pipeline-to-list-files | ||
spec: | ||
resources: | ||
- name: pipeline-git | ||
type: git | ||
params: | ||
- name: "path" | ||
default: "README.md" | ||
tasks: | ||
- name: list-files | ||
taskRef: | ||
name: task-to-list-files | ||
resources: | ||
inputs: | ||
- name: pipeline-git | ||
resource: pipeline-git | ||
outputs: | ||
- name: pipeline-git | ||
resource: pipeline-git | ||
|
||
--- | ||
|
||
apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineRun | ||
metadata: | ||
name: demo-pipelinerun-with-resourcespec | ||
spec: | ||
pipelineRef: | ||
name: pipeline-to-list-files | ||
serviceAccount: 'default' | ||
resources: | ||
- name: pipeline-git | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: master | ||
- name: url | ||
value: https://github.com/tektoncd/pipeline |
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.