Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link outputSourceBindings from one PipelineTask to inputSourceBindings of next task #148

Closed
nader-ziada opened this issue Oct 12, 2018 · 5 comments
Labels
meaty-juicy-coding-work This task is mostly about implementation!!! And docs and tests of course but that's a given

Comments

@nader-ziada
Copy link
Member

Expected Behavior

A PipelineTask defined in a Pipeline yaml should link the output of one task to the input of the next task. For example a task to build and push a container image from source would pass that image along to the next task to deploy it.

apiVersion: pipeline.knative.dev/v1alpha1
kind: Pipeline
metadata:
  name: kritis-pipeline
  namespace: default
spec:
  tasks:
    - name: push-kritis              
      taskRef:
        name: build-push
      inputSourceBindings:
        - name: kritis-app-github
          key: workspace 
          resourceRef:
            name: kritis-repo-git
      outputSourceBindings:
        - name: kritisImage
          key: builtImage 
          resourceRef:
            name: kritis-resources-image
    - name: deploy-test-env           
      taskRef:
        name: deploy-with-helm
      inputSourceBindings:
        - name: kritisImage
          key: builtImage
          resourceRef:
            name: kritis-resources-image
          passedConstraints: [build-push]
      params:
        - name: pathToHelmCharts
          value: kritis-charts
      clusterBindings:
        - inputName: targetCluster
          key: testCluster

In this example, the builtImage resource created in the first task push-kritis (outputSourceBinding: kritisImage) should be passed along to the input of the deploy-test-env task as the inputSourceBinding (kritisImage)

Actual Behavior

input resources are not currently linked

Additional Info

  • The taskRun controller should ensure the version that got created in the first task is consumed by the taskRun of the next task
@bobcatfish bobcatfish added the meaty-juicy-coding-work This task is mostly about implementation!!! And docs and tests of course but that's a given label Oct 12, 2018
@shashwathi
Copy link
Contributor

/assign @shashwathi

@shashwathi
Copy link
Contributor

I think #160 is implementing this.

@nader-ziada
Copy link
Member Author

pr #160 doesn’t figure out how to move artifacts between task runs, it just makes sure the tasks respect the order based on the passed constraints

@shashwathi
Copy link
Contributor

Need to address #173 before diving into this issue.

@shashwathi
Copy link
Contributor

shashwathi commented Nov 7, 2018

Related issue #124

shashwathi pushed a commit to shashwathi/build-pipeline that referenced this issue Nov 28, 2018
- 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.

Partially fixes tektoncd#148
shashwathi pushed a commit to shashwathi/build-pipeline that referenced this issue Nov 29, 2018
- 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.

Partially fixes tektoncd#148
shashwathi pushed a commit to shashwathi/build-pipeline that referenced this issue Nov 29, 2018
- 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 tektoncd#148
bobcatfish added a commit to bobcatfish/pipeline that referenced this issue Dec 3, 2018
We renamed `inputSourceBindings` (and `outputSourceBindings`) to
`resources` in tektoncd#148 where we also moved the specification of these
bindings into the `PipelineRun` - now the `resources` section in the
`Pipeline` itself exists just to specify dependencies between resources.

But we missed one in the example!

Also created tektoncd#297 to follow up on catching this in validation.
knative-prow-robot pushed a commit that referenced this issue Dec 3, 2018
We renamed `inputSourceBindings` (and `outputSourceBindings`) to
`resources` in #148 where we also moved the specification of these
bindings into the `PipelineRun` - now the `resources` section in the
`Pipeline` itself exists just to specify dependencies between resources.

But we missed one in the example!

Also created #297 to follow up on catching this in validation.
chmouel pushed a commit to chmouel/tektoncd-pipeline that referenced this issue Oct 1, 2019
🤖 Triggering CI on branch 'release-next' after synching to upstream/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meaty-juicy-coding-work This task is mostly about implementation!!! And docs and tests of course but that's a given
Projects
None yet
Development

No branches or pull requests

3 participants