forked from tektoncd/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Pipelines to be used with different Resources
This change makes it possible to reuse a Pipeline with different Resources without having to change the Pipeline itself. It does this by moving the linking of the Resources a Task requires from the Pipeline into the PipelineRun. The relationship between Resources and the Tasks that are expected to be executed on them is still expressed in the Pipeline (via `providedBy`). ResourceBindings move from Pipeline to PipelineRun and become ResourceDependencies. No longer calling these "bindings" in the API or using the term "source" fixes + the additional docs in using.md fixes tektoncd#139. The most difficult part of this change was updating validatePipelineTaskAndTask - hoping to refactor this in a follow up (which would also address tektoncd#213). This interface is still probably not in its final form and hopefully we can iterate on it! Fixes tektoncd#200
- Loading branch information
1 parent
8333cb0
commit c45d62e
Showing
21 changed files
with
605 additions
and
391 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,69 @@ | ||
apiVersion: pipeline.knative.dev/v1alpha1 | ||
kind: PipelineRun | ||
metadata: | ||
name: guestbook-pipeline-run-12321312984 | ||
namespace: default | ||
spec: | ||
pipelineRef: | ||
name: guestbook-example | ||
pipelineParamsRef: | ||
name: pipelineparams-sample | ||
triggerRef: | ||
type: manual | ||
resources: | ||
- name: build-guestbook | ||
inputs: | ||
- name: workspace | ||
resourceRef: | ||
name: guestbook-resources-git | ||
outputs: | ||
- name: builtImage | ||
resourceRef: | ||
name: guestbookstagingimage | ||
- name: build-redis | ||
inputs: | ||
- name: workspace | ||
resourceRef: | ||
name: guestbook-resources-redis-docker | ||
outputs: | ||
- name: builtImage | ||
resourceRef: | ||
name: redisstagingimage | ||
- name: deploy-bundle-test | ||
inputs: | ||
- name: imageToDeploy1 | ||
resourceRef: | ||
name: redisstagingimage | ||
- name: imageToDeploy2 | ||
resourceRef: | ||
name: guestbookstagingimage | ||
- name: workspace | ||
resourceRef: | ||
name: guestbook-resources-redis-docker | ||
- name: testCluster | ||
resourceRef: | ||
name: testcluster | ||
- name: int-test-osx | ||
inputs: | ||
- name: workspace | ||
resourceRef: | ||
name: guestbook-resources-git | ||
- name: int-test-linux | ||
inputs: | ||
- name: workspace | ||
resourceRef: | ||
name: guestbook-resources-git | ||
- name: deploy-bundle-test | ||
inputs: | ||
- name: redisImage | ||
resourceRef: | ||
name: redisstagingimage | ||
- name: guestbookImage | ||
resourceRef: | ||
name: guestbookstagingimage | ||
- name: workspace | ||
resourceRef: | ||
name: guestbook-resources-redis-docker | ||
- name: testCluster | ||
resourceRef: | ||
name: testcluster |
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.