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 to build #173

Closed
shashwathi opened this issue Oct 22, 2018 · 5 comments
Closed

Link outputSourceBindings to build #173

shashwathi opened this issue Oct 22, 2018 · 5 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. meaty-juicy-coding-work This task is mostly about implementation!!! And docs and tests of course but that's a given

Comments

@shashwathi
Copy link
Contributor

Below is a pipeline with a task which has an input source to push-kritis and outputs the image to kritisImage resource. Currently there is no mechanism to capture the kritisImage metadata.
We need this information to use specific version of resource in further tasks of the pipeline.

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

Expected Behavior

Build or TaskRun should hold resource references to outputSourceBindings generated.

Actual Behavior

outputSourceBindings of task is not used.

Additional Info

This should be completed before tackling: #148
This change might require build to be rendered inside build-pipeline.

@bobcatfish bobcatfish added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. meaty-juicy-coding-work This task is mostly about implementation!!! And docs and tests of course but that's a given labels Oct 22, 2018
@bobcatfish
Copy link
Collaborator

@shashwathi could you provide some examples of what metadata you'd expect to see in Build or TaskRun?

@bobcatfish bobcatfish added this to the 0.0.1 Alpha release milestone Nov 3, 2018
@shashwathi
Copy link
Contributor Author

shashwathi commented Nov 5, 2018

@bobcatfish Sorry for late reply.

I started thinking in terms of metadata like this file

version: image-sha // incase of git probably commit sha
name: resource-name

Problem with this approach

  1. After build is done, how do we access this?
    solution: Probably volume or something that we can access after build completes.

  2. Is there a world where task 1 uses github source A and alters the source but not make a commit?
    For example

task
name: create-task
source: git-source-A
steps:
- create-file
task:
name: push-task
source: git-source-A
passedConstraint: [create-task]

In this case step push-task expects the volume from create-task with the changes made. If this is a use case we need to support then metadata is the wrong approach.

Next solution is providing volumes from create-task outputs that you can pass onto push-task as inputs.
Does this make sense? Is there anything any use case I am missing?

@bobcatfish
Copy link
Collaborator

@shashwathi ah okay I think I understand now, thanks for the examples! - I think in fact that #124 might be a duplicate of this, would you agree?

@shashwathi
Copy link
Contributor Author

I will close this issue. My bad I did not notice other issue

@bobcatfish
Copy link
Collaborator

My bad I did not notice other issue

no problem at all! better 2 issues than none :D

hrishin pushed a commit to hrishin/tekton-pipeline that referenced this issue Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. 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

2 participants