Skip to content

Commit

Permalink
Remove CloudEvent Resources
Browse files Browse the repository at this point in the history
This commit removes the CloudEvent Resources
  • Loading branch information
JeromeJu committed Jan 16, 2023
1 parent a044400 commit 1839a7f
Show file tree
Hide file tree
Showing 15 changed files with 300 additions and 888 deletions.
40 changes: 25 additions & 15 deletions docs/pipeline-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5958,9 +5958,9 @@ RunStatus
<h3 id="tekton.dev/v1alpha1.VerificationPolicy">VerificationPolicy
</h3>
<div>
<p>VerificationPolicy defines the Tekton resources and corresponding authorities to verify.
The VerificationPolicy is used in trusted resources to store the public keys to verify
Tekton resources.</p>
<p>VerificationPolicy defines the rules to verify Tekton resources.
VerificationPolicy can config the mapping from resources to a list of public
keys, so when verifying the resources we can use the corresponding public keys.</p>
</div>
<table>
<thead>
Expand Down Expand Up @@ -6026,9 +6026,9 @@ VerificationPolicySpec
</em>
</td>
<td>
<p>Resources defines the patterns of Resources names that should be subject to this policy.
For example, we may want to apply this Policy only from a certain github repo.
Then the ResourcesPattern should include the path. If using gitresolver, and we want to config keys from a certain git repo.
<p>Resources defines the patterns of resources sources that should be subject to this policy.
For example, we may want to apply this Policy from a certain GitHub repo.
Then the ResourcesPattern should be valid regex. E.g. If using gitresolver, and we want to config keys from a certain git repo.
<code>ResourcesPattern</code> can be <code>https://github.com/tektoncd/catalog.git</code>, we will use regex to filter out those resources.</p>
</td>
</tr>
Expand Down Expand Up @@ -6186,7 +6186,7 @@ the controller, but was unused as there is no controller for PipelineResource.</
(<em>Appears on:</em><a href="#tekton.dev/v1alpha1.VerificationPolicySpec">VerificationPolicySpec</a>)
</p>
<div>
<p>The Authority block defines the rules for validating signatures.</p>
<p>The Authority block defines the keys for validating signatures.</p>
</div>
<table>
<thead>
Expand Down Expand Up @@ -6217,7 +6217,7 @@ KeyRef
</em>
</td>
<td>
<p>Key defines the type of key to validate the resource.</p>
<p>Key contains the public key to validate the resource.</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -6293,6 +6293,14 @@ structs.</p>
</tr>
</tbody>
</table>
<h3 id="tekton.dev/v1alpha1.HashAlgorithm">HashAlgorithm
(<code>string</code> alias)</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1alpha1.KeyRef">KeyRef</a>)
</p>
<div>
<p>HashAlgorithm defines the hash algorithm used for the public key</p>
</div>
<h3 id="tekton.dev/v1alpha1.KeyRef">KeyRef
</h3>
<p>
Expand Down Expand Up @@ -6339,7 +6347,9 @@ string
<td>
<code>hashAlgorithm</code><br/>
<em>
string
<a href="#tekton.dev/v1alpha1.HashAlgorithm">
HashAlgorithm
</a>
</em>
</td>
<td>
Expand Down Expand Up @@ -6374,8 +6384,8 @@ string
</td>
<td>
<p>Pattern defines a resource pattern. Regex is created to filter resources based on <code>Pattern</code>
Examples patterns:
Github resource: <a href="https://github.com/tektoncd/catalog.git">https://github.com/tektoncd/catalog.git</a>, <a href="https://github.com/tektoncd/*">https://github.com/tektoncd/*</a>
Example patterns:
GitHub resource: <a href="https://github.com/tektoncd/catalog.git">https://github.com/tektoncd/catalog.git</a>, <a href="https://github.com/tektoncd/*">https://github.com/tektoncd/*</a>
Bundle resource: gcr.io/tekton-releases/catalog/upstream/git-clone, gcr.io/tekton-releases/catalog/upstream/*
Hub resource: <a href="https://artifacthub.io/*">https://artifacthub.io/*</a>,</p>
</td>
Expand Down Expand Up @@ -6585,9 +6595,9 @@ Refer Go&rsquo;s ParseDuration documentation for expected format: <a href="https
</em>
</td>
<td>
<p>Resources defines the patterns of Resources names that should be subject to this policy.
For example, we may want to apply this Policy only from a certain github repo.
Then the ResourcesPattern should include the path. If using gitresolver, and we want to config keys from a certain git repo.
<p>Resources defines the patterns of resources sources that should be subject to this policy.
For example, we may want to apply this Policy from a certain GitHub repo.
Then the ResourcesPattern should be valid regex. E.g. If using gitresolver, and we want to config keys from a certain git repo.
<code>ResourcesPattern</code> can be <code>https://github.com/tektoncd/catalog.git</code>, we will use regex to filter out those resources.</p>
</td>
</tr>
Expand Down Expand Up @@ -12772,7 +12782,7 @@ string
<h3 id="tekton.dev/v1beta1.TaskRunConditionType">TaskRunConditionType
(<code>string</code> alias)</h3>
<div>
<p>TaskRunConditionType is an enum used to store TaskRun custom conditions
<p>TaskRunConditionType is an enum used to store TaskRun custom
conditions such as one used in spire results verification</p>
</div>
<h3 id="tekton.dev/v1beta1.TaskRunDebug">TaskRunDebug
Expand Down
184 changes: 0 additions & 184 deletions examples/v1beta1/taskruns/cloud-event.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions pkg/apis/pipeline/v1beta1/resource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ const (

// 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.
Expand Down
3 changes: 0 additions & 3 deletions pkg/apis/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/tektoncd/pipeline/pkg/apis/pipeline"
pipelinev1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
resourcev1alpha1 "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1"
"github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/cloudevent"
"github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/cluster"
"github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/git"
"github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/image"
Expand All @@ -45,8 +44,6 @@ func FromType(name string, r *resourcev1alpha1.PipelineResource, images pipeline
return storage.NewResource(name, images, r)
case resourcev1alpha1.PipelineResourceTypePullRequest:
return pullrequest.NewResource(name, images.PRImage, r)
case resourcev1alpha1.PipelineResourceTypeCloudEvent:
return cloudevent.NewResource(name, r)
}
return nil, fmt.Errorf("%s is an invalid or unimplemented PipelineResource", r.Spec.Type)
}
Loading

0 comments on commit 1839a7f

Please sign in to comment.