- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.8k
Migrate PipelineResource in their own package… 📦 #1773
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
          
     Merged
      
      
            tekton-robot
  merged 1 commit into
  tektoncd:master
from
vdemeester:move-resource-separate-package
  
      
      
   
  Jan 9, 2020 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
  File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,78 @@ | ||
| /* | ||
| Copyright 2019 The Tekton Authors | ||
|  | ||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|  | ||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|  | ||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|  | ||
| package v1alpha1 | ||
|  | ||
| import ( | ||
| resource "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1" | ||
| ) | ||
|  | ||
| // PipelineResourceType represents the type of endpoint the pipelineResource is, so that the | ||
| // controller will know this pipelineResource should be fetched and optionally what | ||
| // additional metatdata should be provided for it. | ||
| type PipelineResourceType = resource.PipelineResourceType | ||
|  | ||
| var ( | ||
| AllowedOutputResources = resource.AllowedOutputResources | ||
| ) | ||
|  | ||
| const ( | ||
| // PipelineResourceTypeGit indicates that this source is a GitHub repo. | ||
| PipelineResourceTypeGit PipelineResourceType = resource.PipelineResourceTypeGit | ||
|  | ||
| // PipelineResourceTypeStorage indicates that this source is a storage blob resource. | ||
| PipelineResourceTypeStorage PipelineResourceType = resource.PipelineResourceTypeStorage | ||
|  | ||
| // PipelineResourceTypeImage indicates that this source is a docker Image. | ||
| PipelineResourceTypeImage PipelineResourceType = resource.PipelineResourceTypeImage | ||
|  | ||
| // PipelineResourceTypeCluster indicates that this source is a k8s cluster Image. | ||
| PipelineResourceTypeCluster PipelineResourceType = resource.PipelineResourceTypeCluster | ||
|  | ||
| // PipelineResourceTypePullRequest indicates that this source is a SCM Pull Request. | ||
| PipelineResourceTypePullRequest PipelineResourceType = resource.PipelineResourceTypePullRequest | ||
|  | ||
| // PipelineResourceTypeCloudEvent indicates that this source is a cloud event URI | ||
| PipelineResourceTypeCloudEvent PipelineResourceType = resource.PipelineResourceTypeCloudEvent | ||
| ) | ||
|  | ||
| // AllResourceTypes can be used for validation to check if a provided Resource type is one of the known types. | ||
| var AllResourceTypes = resource.AllResourceTypes | ||
|  | ||
| // PipelineResource describes a resource that is an input to or output from a | ||
| // Task. | ||
| // | ||
| type PipelineResource = resource.PipelineResource | ||
|  | ||
| // PipelineResourceSpec defines an individual resources used in the pipeline. | ||
| type PipelineResourceSpec = resource.PipelineResourceSpec | ||
|  | ||
| // SecretParam indicates which secret can be used to populate a field of the resource | ||
| type SecretParam = resource.SecretParam | ||
|  | ||
| // ResourceParam declares a string value to use for the parameter called Name, and is used in | ||
| // the specific context of PipelineResources. | ||
| type ResourceParam = resource.ResourceParam | ||
|  | ||
| // ResourceDeclaration defines an input or output PipelineResource declared as a requirement | ||
| // by another type such as a Task or Condition. The Name field will be used to refer to these | ||
| // PipelineResources within the type's definition, and when provided as an Input, the Name will be the | ||
| // path to the volume mounted containing this PipelineResource as an input (e.g. | ||
| // an input Resource named `workspace` will be mounted at `/workspace`). | ||
| type ResourceDeclaration = resource.ResourceDeclaration | ||
|  | ||
| // PipelineResourceList contains a list of PipelineResources | ||
| type PipelineResourceList = resource.PipelineResourceList | 
  
    
      This file contains hidden or 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 hidden or 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 hidden or 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.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to add some comments around the enw lines in this script explaining what they do? and/or explain in the commit message? iirc from the previous review, it was not obvious what you had to do to make this work without a different apigroup, might be useful to record how this ended up working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah this comes from #1783.. forgot to mention that 😂 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to update comments on the
bash …calls though, to explain why there is 2 indeedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kk! happy for that to be in follow up PR :)