diff --git a/docs/pipeline-api.md b/docs/pipeline-api.md index 923318413a2..793f0653751 100644 --- a/docs/pipeline-api.md +++ b/docs/pipeline-api.md @@ -5958,9 +5958,9 @@ RunStatus

VerificationPolicy

-

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.

+

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.

@@ -6026,9 +6026,9 @@ VerificationPolicySpec @@ -6186,7 +6186,7 @@ the controller, but was unused as there is no controller for PipelineResource.Appears on:VerificationPolicySpec)

-

The Authority block defines the rules for validating signatures.

+

The Authority block defines the keys for validating signatures.

-

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. +

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. ResourcesPattern can be https://github.com/tektoncd/catalog.git, we will use regex to filter out those resources.

@@ -6217,7 +6217,7 @@ KeyRef @@ -6293,6 +6293,14 @@ structs.

-

Key defines the type of key to validate the resource.

+

Key contains the public key to validate the resource.

+

HashAlgorithm +(string alias)

+

+(Appears on:KeyRef) +

+
+

HashAlgorithm defines the hash algorithm used for the public key

+

KeyRef

@@ -6339,7 +6347,9 @@ string hashAlgorithm
-string + +HashAlgorithm + @@ -6374,8 +6384,8 @@ string

Pattern defines a resource pattern. Regex is created to filter resources based on Pattern -Examples patterns: -Github resource: https://github.com/tektoncd/catalog.git, https://github.com/tektoncd/* +Example patterns: +GitHub resource: https://github.com/tektoncd/catalog.git, https://github.com/tektoncd/* Bundle resource: gcr.io/tekton-releases/catalog/upstream/git-clone, gcr.io/tekton-releases/catalog/upstream/* Hub resource: https://artifacthub.io/*,

@@ -6585,9 +6595,9 @@ Refer Go’s ParseDuration documentation for expected format: TaskRunConditionType (string alias)
-

TaskRunConditionType is an enum used to store TaskRun custom conditions +

TaskRunConditionType is an enum used to store TaskRun custom conditions such as one used in spire results verification

TaskRunDebug diff --git a/examples/v1beta1/taskruns/cloud-event.yaml b/examples/v1beta1/taskruns/cloud-event.yaml deleted file mode 100644 index 1302233b2ed..00000000000 --- a/examples/v1beta1/taskruns/cloud-event.yaml +++ /dev/null @@ -1,184 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: sink -spec: - selector: - app: cloudevent - ports: - - protocol: TCP - port: 8080 - targetPort: 8080 ---- -apiVersion: v1 -kind: Pod -metadata: - labels: - app: cloudevent - name: message-sink -spec: - containers: - - env: - - name: PORT - value: "8080" - name: cloudeventlistener - image: python:3-alpine - imagePullPolicy: IfNotPresent - command: ["/bin/sh"] - args: - - -ce - - | - cat <

POST!

') - - def do_GET(self): - with open("content.txt", mode="rb") as f: - content = f.read() - self.send_response(200 if content else 404) - self.send_header('Content-type', 'text/plain') - self.end_headers() - self.wfile.write(content) - - if __name__ == "__main__": - open("content.txt", 'a').close() - httpd = HTTPServer(('', $PORT), GetAndPostHandler) - print('Starting httpd...') - httpd.serve_forever() - EOF - ports: - - containerPort: 8080 - name: user-port - protocol: TCP ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: send-cloud-event-task - -spec: - resources: - outputs: - - name: myimage - type: image - - name: notification - type: cloudEvent - steps: - - name: wait-for-sink - image: python:3-alpine - imagePullPolicy: IfNotPresent - script: | - #!/usr/bin/env python3 - import http.client - import json - import sys - import time - - while True: - conn = http.client.HTTPConnection("sink:8080") - try: - conn.request("GET", "/") - break - except: - # Perhaps the service is not setup yet, so service name does not - # resolve or it does not accept connections on 8080 yet - print("Not yet...") - time.sleep(10) - - name: build-index-json - image: busybox - script: | - set -e - cat < $(resources.outputs.myimage.path)/index.json - { - "schemaVersion": 2, - "manifests": [ - { - "mediaType": "application/vnd.oci.image.index.v1+json", - "size": 314, - "digest": "sha256:deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" - } - ] - } ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: poll-for-content-task -spec: - steps: - - name: polling - image: python:3-alpine - imagePullPolicy: IfNotPresent - script: | - #!/usr/bin/env python3 - import http.client - import json - import sys - import time - - while True: - conn = http.client.HTTPConnection("sink:8080") - try: - conn.request("GET", "/") - except: - # Perhaps the service is not setup yet, so service name does not - # resolve or it does not accept connections on 8080 yet - print("Not yet...") - time.sleep(10) - continue - response = conn.getresponse() - if response.status == 200: - print("Got it!") - taskrun = json.loads(response.read().decode('utf-8')) - digest = taskrun['taskRun']['status']['resourcesResult'][0]['value'] - image_name = taskrun['taskRun']['status']['resourcesResult'][0]['resourceName'] - print("Got digest %s for image %s" % (digest, image_name)) - if image_name == "myimage" and digest: - break - else: - sys.exit(1) - else: - print("Not yet...") - time.sleep(10) ---- -# `PipelineResources` are deprecated, consider using `Tasks` and other replacement features instead -# https://github.com/tektoncd/pipeline/blob/main/docs/migrating-v1alpha1-to-v1beta1.md#replacing-pipelineresources-with-tasks -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: send-cloud-event -spec: - resources: - outputs: - - name: myimage - resourceSpec: - type: image - params: - - name: url - value: fake-registry/test/fake-image - - name: notification - resourceSpec: - type: cloudEvent - params: - - name: targetURI - value: http://sink.default:8080 - taskRef: - name: send-cloud-event-task ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: poll-for-content-run -spec: - taskRef: - name: poll-for-content-task diff --git a/pkg/apis/pipeline/v1beta1/resource_types.go b/pkg/apis/pipeline/v1beta1/resource_types.go index 9a1602c27f5..6294bfcf88d 100644 --- a/pkg/apis/pipeline/v1beta1/resource_types.go +++ b/pkg/apis/pipeline/v1beta1/resource_types.go @@ -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. diff --git a/pkg/apis/resource/resource.go b/pkg/apis/resource/resource.go index eb6580fe474..9014605eb91 100644 --- a/pkg/apis/resource/resource.go +++ b/pkg/apis/resource/resource.go @@ -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" @@ -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) } diff --git a/pkg/apis/resource/v1alpha1/cloudevent/cloud_event_resource.go b/pkg/apis/resource/v1alpha1/cloudevent/cloud_event_resource.go deleted file mode 100644 index ce97be0ef2c..00000000000 --- a/pkg/apis/resource/v1alpha1/cloudevent/cloud_event_resource.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2019-2020 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 cloudevent - -import ( - "fmt" - "strings" - - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" - resource "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1" -) - -// Resource is an event sink to which events are delivered when a TaskRun has finished -type Resource struct { - // Name is the name used to reference to the PipelineResource - Name string `json:"name"` - // Type must be `PipelineResourceTypeCloudEvent` - Type resource.PipelineResourceType `json:"type"` - // TargetURI is the URI of the sink which the cloud event is develired to - TargetURI string `json:"targetURI"` -} - -// NewResource creates a new CloudEvent resource to pass to a Task -func NewResource(name string, r *resource.PipelineResource) (*Resource, error) { - if r.Spec.Type != resource.PipelineResourceTypeCloudEvent { - return nil, fmt.Errorf("cloudevent.Resource: Cannot create a Cloud Event resource from a %s Pipeline Resource", r.Spec.Type) - } - var targetURI string - var targetURISpecified bool - - for _, param := range r.Spec.Params { - if strings.EqualFold(param.Name, "TargetURI") { - targetURI = param.Value - if param.Value != "" { - targetURISpecified = true - } - } - } - - if !targetURISpecified { - return nil, fmt.Errorf("cloudevent.Resource: Need URI to be specified in order to create a CloudEvent resource %s", r.Name) - } - return &Resource{ - Name: name, - Type: r.Spec.Type, - TargetURI: targetURI, - }, nil -} - -// GetName returns the name of the resource -func (s Resource) GetName() string { - return s.Name -} - -// GetType returns the type of the resource, in this case "cloudEvent" -func (s Resource) GetType() resource.PipelineResourceType { - return resource.PipelineResourceTypeCloudEvent -} - -// Replacements is used for template replacement on an CloudEventResource inside of a Taskrun. -func (s *Resource) Replacements() map[string]string { - return map[string]string{ - "name": s.Name, - "type": s.Type, - "target-uri": s.TargetURI, - } -} - -// GetInputTaskModifier returns the TaskModifier to be used when this resource is an input. -func (s *Resource) GetInputTaskModifier(_ *v1beta1.TaskSpec, _ string) (v1beta1.TaskModifier, error) { - return &v1beta1.InternalTaskModifier{}, nil -} - -// GetOutputTaskModifier returns a No-op TaskModifier. -func (s *Resource) GetOutputTaskModifier(_ *v1beta1.TaskSpec, _ string) (v1beta1.TaskModifier, error) { - return &v1beta1.InternalTaskModifier{}, nil -} diff --git a/pkg/apis/resource/v1alpha1/cloudevent/cloud_event_resource_test.go b/pkg/apis/resource/v1alpha1/cloudevent/cloud_event_resource_test.go deleted file mode 100644 index 389c8dbfe12..00000000000 --- a/pkg/apis/resource/v1alpha1/cloudevent/cloud_event_resource_test.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -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 cloudevent_test - -import ( - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/google/go-cmp/cmp" - "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/test/diff" -) - -func TestNewResource_Invalid(t *testing.T) { - testcases := []struct { - name string - pipelineResource *resourcev1alpha1.PipelineResource - }{{ - name: "create resource with no parameter", - pipelineResource: &resourcev1alpha1.PipelineResource{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cloud-event-resource-no-uri", - }, - Spec: resourcev1alpha1.PipelineResourceSpec{ - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - }, - }, - }, { - name: "create resource with invalid type", - pipelineResource: &resourcev1alpha1.PipelineResource{ - ObjectMeta: metav1.ObjectMeta{ - Name: "git-resource", - }, - Spec: resourcev1alpha1.PipelineResourceSpec{ - Type: resourcev1alpha1.PipelineResourceTypeGit, - Params: []resourcev1alpha1.ResourceParam{ - { - Name: "URL", - Value: "git://fake/repo", - }, - { - Name: "Revision", - Value: "fake_rev", - }, - }, - }, - }, - }} - for _, tc := range testcases { - t.Run(tc.name, func(t *testing.T) { - _, err := cloudevent.NewResource("test-resource", tc.pipelineResource) - if err == nil { - t.Error("Expected error creating CloudEvent resource") - } - }) - } -} - -func TestNewResource_Valid(t *testing.T) { - pr := &resourcev1alpha1.PipelineResource{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cloud-event-resource-uri", - }, - Spec: resourcev1alpha1.PipelineResourceSpec{ - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - Params: []resourcev1alpha1.ResourceParam{{ - Name: "TargetURI", - Value: "http://fake-sink", - }}, - }, - } - expectedResource := &cloudevent.Resource{ - Name: "test-resource", - TargetURI: "http://fake-sink", - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - } - - r, err := cloudevent.NewResource("test-resource", pr) - if err != nil { - t.Fatalf("Unexpected error creating CloudEvent resource: %s", err) - } - if d := cmp.Diff(expectedResource, r); d != "" { - t.Errorf("Mismatch of CloudEvent resource %s", diff.PrintWantGot(d)) - } -} - -func TestCloudEvent_GetReplacements(t *testing.T) { - r := &cloudevent.Resource{ - Name: "cloud-event-resource", - TargetURI: "http://fake-uri", - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - } - expectedReplacementMap := map[string]string{ - "name": "cloud-event-resource", - "type": "cloudEvent", - "target-uri": "http://fake-uri", - } - if d := cmp.Diff(r.Replacements(), expectedReplacementMap); d != "" { - t.Errorf("CloudEvent Replacement map mismatch: %s", d) - } -} - -func TestCloudEvent_InputContainerSpec(t *testing.T) { - r := &cloudevent.Resource{ - Name: "cloud-event-resource", - TargetURI: "http://fake-uri", - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - } - d, e := r.GetInputTaskModifier(&v1beta1.TaskSpec{}, "") - if d.GetStepsToPrepend() != nil { - t.Errorf("Did not expect a download container for Resource") - } - if e != nil { - t.Errorf("Did not expect an error %s when getting a download container for Resource", e) - } -} - -func TestCloudEvent_OutputContainerSpec(t *testing.T) { - r := &cloudevent.Resource{ - Name: "cloud-event-resource", - TargetURI: "http://fake-uri", - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - } - d, e := r.GetOutputTaskModifier(&v1beta1.TaskSpec{}, "") - if d.GetStepsToAppend() != nil { - t.Errorf("Did not expect an upload container for Resource") - } - if e != nil { - t.Errorf("Did not expect an error %s when getting an upload container for Resource", e) - } -} diff --git a/pkg/apis/resource/v1alpha1/pipeline_resource_types.go b/pkg/apis/resource/v1alpha1/pipeline_resource_types.go index 9d1f2ff6e32..332791cf0e5 100644 --- a/pkg/apis/resource/v1alpha1/pipeline_resource_types.go +++ b/pkg/apis/resource/v1alpha1/pipeline_resource_types.go @@ -49,15 +49,12 @@ const ( // PipelineResourceTypePullRequest indicates that this source is a SCM Pull Request. PipelineResourceTypePullRequest PipelineResourceType = "pullRequest" - // PipelineResourceTypeCloudEvent indicates that this source is a cloud event URI - PipelineResourceTypeCloudEvent PipelineResourceType = "cloudEvent" - // PipelineResourceTypeGCS is the subtype for the GCSResources, which is backed by a GCS blob/directory. PipelineResourceTypeGCS PipelineResourceType = "gcs" ) // AllResourceTypes can be used for validation to check if a provided Resource type is one of the known types. -var AllResourceTypes = []PipelineResourceType{PipelineResourceTypeGit, PipelineResourceTypeStorage, PipelineResourceTypeImage, PipelineResourceTypeCluster, PipelineResourceTypePullRequest, PipelineResourceTypeCloudEvent} +var AllResourceTypes = []PipelineResourceType{PipelineResourceTypeGit, PipelineResourceTypeStorage, PipelineResourceTypeImage, PipelineResourceTypeCluster, PipelineResourceTypePullRequest} // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/pkg/reconciler/events/cloudevent/cloud_event_controller.go b/pkg/reconciler/events/cloudevent/cloud_event_controller.go index 85087f84301..6b516439f2c 100644 --- a/pkg/reconciler/events/cloudevent/cloud_event_controller.go +++ b/pkg/reconciler/events/cloudevent/cloud_event_controller.go @@ -26,8 +26,6 @@ import ( "github.com/tektoncd/pipeline/pkg/apis/config" "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1" "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" - resource "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1" - "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/cloudevent" "github.com/tektoncd/pipeline/pkg/reconciler/events/cache" "go.uber.org/zap" corev1 "k8s.io/api/core/v1" @@ -40,24 +38,6 @@ import ( "knative.dev/pkg/logging" ) -// InitializeCloudEvents initializes the CloudEvents part of the -// TaskRunStatus from a slice of PipelineResources -func InitializeCloudEvents(tr *v1beta1.TaskRun, prs map[string]*resource.PipelineResource) { - // If there are no cloud event resources, this check will run on every reconcile - if len(tr.Status.CloudEvents) == 0 { - var targets []string - for name, output := range prs { - if output.Spec.Type == resource.PipelineResourceTypeCloudEvent { - cer, _ := cloudevent.NewResource(name, output) - targets = append(targets, cer.TargetURI) - } - } - if len(targets) > 0 { - tr.Status.CloudEvents = cloudEventDeliveryFromTargets(targets) - } - } -} - func cloudEventDeliveryFromTargets(targets []string) []v1beta1.CloudEventDelivery { if len(targets) > 0 { initialState := v1beta1.CloudEventDeliveryState{ diff --git a/pkg/reconciler/events/cloudevent/cloud_event_controller_test.go b/pkg/reconciler/events/cloudevent/cloud_event_controller_test.go index 0f154711c0c..0cc41621841 100644 --- a/pkg/reconciler/events/cloudevent/cloud_event_controller_test.go +++ b/pkg/reconciler/events/cloudevent/cloud_event_controller_test.go @@ -25,7 +25,6 @@ import ( "github.com/tektoncd/pipeline/pkg/apis/config" "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1" "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" - resourcev1alpha1 "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1" "github.com/tektoncd/pipeline/pkg/reconciler/events/k8sevent" "github.com/tektoncd/pipeline/test/diff" corev1 "k8s.io/api/core/v1" @@ -348,203 +347,6 @@ func TestSendCloudEventsErrors(t *testing.T) { } } -func TestInitializeCloudEvents(t *testing.T) { - tests := []struct { - name string - taskRun *v1beta1.TaskRun - pipelineResources []*resourcev1alpha1.PipelineResource - wantTaskRun *v1beta1.TaskRun - }{{ - name: "testWithMultipleMixedResources", - taskRun: &v1beta1.TaskRun{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-taskrun-multiple-mixed-resources", - Namespace: "foo", - SelfLink: "/task/1234", - }, - Spec: v1beta1.TaskRunSpec{ - TaskRef: &v1beta1.TaskRef{ - Name: "fakeTaskName", - }, - Resources: &v1beta1.TaskRunResources{ - Outputs: []v1beta1.TaskResourceBinding{ - { - PipelineResourceBinding: v1beta1.PipelineResourceBinding{ - Name: "ce1", - ResourceRef: &v1beta1.PipelineResourceRef{ - Name: "ce1", - }, - }, - }, - { - PipelineResourceBinding: v1beta1.PipelineResourceBinding{ - Name: "git", - ResourceRef: &v1beta1.PipelineResourceRef{ - Name: "git", - }, - }, - }, - { - PipelineResourceBinding: v1beta1.PipelineResourceBinding{ - Name: "ce2", - ResourceRef: &v1beta1.PipelineResourceRef{ - Name: "ce2", - }, - }, - }, - }, - }, - }, - }, - pipelineResources: []*resourcev1alpha1.PipelineResource{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "ce1", - Namespace: "foo", - }, - Spec: resourcev1alpha1.PipelineResourceSpec{ - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - Params: []resourcev1alpha1.ResourceParam{{ - Name: "TargetURI", - Value: "http://foosink", - }}, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "ce2", - Namespace: "foo", - }, - Spec: resourcev1alpha1.PipelineResourceSpec{ - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - Params: []resourcev1alpha1.ResourceParam{{ - Name: "TargetURI", - Value: "http://barsink", - }}, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "git", - Namespace: "foo", - }, - Spec: resourcev1alpha1.PipelineResourceSpec{ - Type: resourcev1alpha1.PipelineResourceTypeGit, - Params: []resourcev1alpha1.ResourceParam{ - { - Name: "URL", - Value: "http://git.fake", - }, - { - Name: "Revision", - Value: "abcd", - }, - }, - }, - }, - }, - wantTaskRun: &v1beta1.TaskRun{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-taskrun-multiple-mixed-resources", - Namespace: "foo", - }, - Spec: v1beta1.TaskRunSpec{ - TaskRef: &v1beta1.TaskRef{ - Name: "fakeTaskName", - }, - }, - Status: v1beta1.TaskRunStatus{ - TaskRunStatusFields: v1beta1.TaskRunStatusFields{ - CloudEvents: []v1beta1.CloudEventDelivery{ - { - Target: "http://barsink", - Status: v1beta1.CloudEventDeliveryState{ - Condition: v1beta1.CloudEventConditionUnknown, - }, - }, - { - Target: "http://foosink", - Status: v1beta1.CloudEventDeliveryState{ - Condition: v1beta1.CloudEventConditionUnknown, - }, - }, - }, - }, - }, - }, - }, { - name: "testWithNoCloudEventResources", - taskRun: &v1beta1.TaskRun{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-taskrun-no-cloudevent-resources", - Namespace: "foo", - SelfLink: "/task/1234", - }, - Spec: v1beta1.TaskRunSpec{ - TaskRef: &v1beta1.TaskRef{ - Name: "fakeTaskName", - }, - Resources: &v1beta1.TaskRunResources{ - Outputs: []v1beta1.TaskResourceBinding{{ - PipelineResourceBinding: v1beta1.PipelineResourceBinding{ - Name: "git", - ResourceRef: &v1beta1.PipelineResourceRef{ - Name: "git", - }, - }, - }}, - }, - }, - }, - pipelineResources: []*resourcev1alpha1.PipelineResource{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "git", - Namespace: "foo", - }, - Spec: resourcev1alpha1.PipelineResourceSpec{ - Type: resourcev1alpha1.PipelineResourceTypeGit, - Params: []resourcev1alpha1.ResourceParam{ - { - Name: "URL", - Value: "http://git.fake", - }, - { - Name: "Revision", - Value: "abcd", - }, - }, - }, - }, - }, - wantTaskRun: &v1beta1.TaskRun{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-taskrun-no-cloudevent-resources", - Namespace: "foo", - }, - Spec: v1beta1.TaskRunSpec{ - TaskRef: &v1beta1.TaskRef{ - Name: "fakeTaskName", - }, - }, - Status: v1beta1.TaskRunStatus{}, - }, - }} - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - prMap := map[string]*resourcev1alpha1.PipelineResource{} - for _, pr := range tc.pipelineResources { - prMap[pr.Name] = pr - } - InitializeCloudEvents(tc.taskRun, prMap) - opts := GetCloudEventDeliveryCompareOptions() - if d := cmp.Diff(tc.wantTaskRun.Status, tc.taskRun.Status, opts...); d != "" { - t.Errorf("Wrong Cloud Events Status %s", diff.PrintWantGot(d)) - } - }) - } -} - func TestSendCloudEventWithRetries(t *testing.T) { objectStatus := duckv1.Status{ Conditions: []apis.Condition{{ diff --git a/pkg/reconciler/taskrun/taskrun.go b/pkg/reconciler/taskrun/taskrun.go index ccc5349c1a2..cb768f59e66 100644 --- a/pkg/reconciler/taskrun/taskrun.go +++ b/pkg/reconciler/taskrun/taskrun.go @@ -442,13 +442,6 @@ func (c *Reconciler) prepare(ctx context.Context, tr *v1beta1.TaskRun) (*v1beta1 return nil, nil, controller.NewPermanentError(err) } - // Initialize the cloud events if at least a CloudEventResource is defined - // and they have not been initialized yet. - // FIXME(afrittoli) This resource specific logic will have to be replaced - // once we have a custom PipelineResource framework in place. - logger.Debugf("Cloud Events: %s", tr.Status.CloudEvents) - cloudevent.InitializeCloudEvents(tr, rtr.Outputs) - return taskSpec, rtr, nil } diff --git a/pkg/reconciler/taskrun/taskrun_test.go b/pkg/reconciler/taskrun/taskrun_test.go index 6c8d0fa5c59..974131932e5 100644 --- a/pkg/reconciler/taskrun/taskrun_test.go +++ b/pkg/reconciler/taskrun/taskrun_test.go @@ -299,29 +299,6 @@ var ( }, } - twoOutputsTask = &v1beta1.Task{ - ObjectMeta: objectMeta("test-two-output-task", "foo"), - Spec: v1beta1.TaskSpec{ - Steps: []v1beta1.Step{simpleStep}, - Resources: &v1beta1.TaskResources{ - Outputs: []v1beta1.TaskResource{ - { - ResourceDeclaration: v1beta1.ResourceDeclaration{ - Name: cloudEventResource.Name, - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - }, - }, - { - ResourceDeclaration: v1beta1.ResourceDeclaration{ - Name: anotherCloudEventResource.Name, - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - }, - }, - }, - }, - }, - } - gitResource = &resourcev1alpha1.PipelineResource{ ObjectMeta: objectMeta("git-resource", "foo"), Spec: resourcev1alpha1.PipelineResourceSpec{ @@ -352,26 +329,6 @@ var ( }}, }, } - cloudEventResource = &resourcev1alpha1.PipelineResource{ - ObjectMeta: objectMeta("cloud-event-resource", "foo"), - Spec: resourcev1alpha1.PipelineResourceSpec{ - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - Params: []resourcev1alpha1.ResourceParam{{ - Name: "TargetURI", - Value: cloudEventTarget1, - }}, - }, - } - anotherCloudEventResource = &resourcev1alpha1.PipelineResource{ - ObjectMeta: objectMeta("another-cloud-event-resource", "foo"), - Spec: resourcev1alpha1.PipelineResourceSpec{ - Type: resourcev1alpha1.PipelineResourceTypeCloudEvent, - Params: []resourcev1alpha1.ResourceParam{{ - Name: "TargetURI", - Value: cloudEventTarget2, - }}, - }, - } binVolume = corev1.Volume{ Name: "tekton-internal-bin", @@ -3149,102 +3106,6 @@ spec: taskRef: apiVersion: a1 name: test-task -`) - taskRunWithTwoCEResourcesNoInit := parse.MustParseV1beta1TaskRun(t, ` -metadata: - name: test-taskrun-two-ce-resources-no-init - namespace: foo -spec: - resources: - outputs: - - name: cloud-event-resource - resourceRef: - name: cloud-event-resource - - name: another-cloud-event-resource - resourceRef: - name: another-cloud-event-resource - taskRef: - name: test-two-output-task -`) - taskRunWithTwoCEResourcesInit := parse.MustParseV1beta1TaskRun(t, ` -metadata: - name: test-taskrun-two-ce-resources-init - namespace: foo -spec: - resources: - outputs: - - name: cloud-event-resource - resourceRef: - name: cloud-event-resource - - name: another-cloud-event-resource - resourceRef: - name: another-cloud-event-resource - taskRef: - name: test-two-output-task -status: - cloudEvents: - - status: - condition: Unknown - target: https://foo - - status: - condition: Unknown - target: https://bar -`) - taskRunWithCESucceded := parse.MustParseV1beta1TaskRun(t, ` -metadata: - name: test-taskrun-ce-succeeded - namespace: foo - selfLink: /task/1234 -spec: - resources: - outputs: - - name: cloud-event-resource - resourceRef: - name: cloud-event-resource - - name: another-cloud-event-resource - resourceRef: - name: another-cloud-event-resource - taskRef: - name: test-two-output-task -status: - cloudEvents: - - status: - condition: Unknown - target: https://foo - - status: - condition: Unknown - target: https://bar - conditions: - - status: "True" - type: Succeeded -`) - taskRunWithCEFailed := parse.MustParseV1beta1TaskRun(t, ` -metadata: - name: test-taskrun-ce-failed - namespace: foo - selfLink: /task/1234 -spec: - resources: - outputs: - - name: cloud-event-resource - resourceRef: - name: cloud-event-resource - - name: another-cloud-event-resource - resourceRef: - name: another-cloud-event-resource - taskRef: - name: test-two-output-task -status: - cloudEvents: - - status: - condition: Unknown - target: https://foo - - status: - condition: Unknown - target: https://bar - conditions: - - status: "False" - type: Succeeded `) taskRunWithCESuccededOneAttempt := parse.MustParseV1beta1TaskRun(t, ` metadata: @@ -3277,16 +3138,15 @@ status: type: Succeeded `) taskruns := []*v1beta1.TaskRun{ - taskRunWithNoCEResources, taskRunWithTwoCEResourcesNoInit, - taskRunWithTwoCEResourcesInit, taskRunWithCESucceded, taskRunWithCEFailed, + taskRunWithNoCEResources, taskRunWithCESuccededOneAttempt, } d := test.Data{ TaskRuns: taskruns, - Tasks: []*v1beta1.Task{simpleTask, twoOutputsTask}, + Tasks: []*v1beta1.Task{simpleTask}, ClusterTasks: []*v1beta1.ClusterTask{}, - PipelineResources: []*resourcev1alpha1.PipelineResource{cloudEventResource, anotherCloudEventResource}, + PipelineResources: []*resourcev1alpha1.PipelineResource{}, } for _, tc := range []struct { name string @@ -3296,78 +3156,6 @@ status: name: "no-ce-resources", taskRun: taskRunWithNoCEResources, wantCloudEvents: taskRunWithNoCEResources.Status.CloudEvents, - }, { - name: "ce-resources-no-init", - taskRun: taskRunWithTwoCEResourcesNoInit, - wantCloudEvents: []v1beta1.CloudEventDelivery{ - { - Target: cloudEventTarget1, - Status: v1beta1.CloudEventDeliveryState{ - Condition: v1beta1.CloudEventConditionUnknown, - }, - }, - { - Target: cloudEventTarget2, - Status: v1beta1.CloudEventDeliveryState{ - Condition: v1beta1.CloudEventConditionUnknown, - }, - }, - }, - }, { - name: "ce-resources-init", - taskRun: taskRunWithTwoCEResourcesInit, - wantCloudEvents: []v1beta1.CloudEventDelivery{ - { - Target: cloudEventTarget1, - Status: v1beta1.CloudEventDeliveryState{ - Condition: v1beta1.CloudEventConditionUnknown, - }, - }, - { - Target: cloudEventTarget2, - Status: v1beta1.CloudEventDeliveryState{ - Condition: v1beta1.CloudEventConditionUnknown, - }, - }, - }, - }, { - name: "ce-resources-init-task-successful", - taskRun: taskRunWithCESucceded, - wantCloudEvents: []v1beta1.CloudEventDelivery{ - { - Target: cloudEventTarget1, - Status: v1beta1.CloudEventDeliveryState{ - Condition: v1beta1.CloudEventConditionSent, - RetryCount: 1, - }, - }, - { - Target: cloudEventTarget2, - Status: v1beta1.CloudEventDeliveryState{ - Condition: v1beta1.CloudEventConditionSent, - RetryCount: 1, - }, - }, - }, - }, { - name: "ce-resources-init-task-failed", - taskRun: taskRunWithCEFailed, - wantCloudEvents: []v1beta1.CloudEventDelivery{ - { - Target: cloudEventTarget1, - Status: v1beta1.CloudEventDeliveryState{ - Condition: v1beta1.CloudEventConditionSent, - RetryCount: 1, - }, - }, - { - Target: cloudEventTarget2, - Status: v1beta1.CloudEventDeliveryState{ - Condition: v1beta1.CloudEventConditionSent, - RetryCount: 1, - }, - }, - }, }, { name: "ce-resources-init-task-successful-one-attempt", taskRun: taskRunWithCESuccededOneAttempt, diff --git a/third_party/github.com/tektoncd/pipeline/LICENSE b/third_party/github.com/LICENSE similarity index 100% rename from third_party/github.com/tektoncd/pipeline/LICENSE rename to third_party/github.com/LICENSE diff --git a/third_party/github.com/cloudflare/circl/LICENSE b/third_party/github.com/cloudflare/circl/LICENSE new file mode 100644 index 00000000000..67edaa90a04 --- /dev/null +++ b/third_party/github.com/cloudflare/circl/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2019 Cloudflare. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Cloudflare nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +======================================================================== + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third_party/github.com/skeema/knownhosts/LICENSE b/third_party/github.com/skeema/knownhosts/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/third_party/github.com/skeema/knownhosts/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + 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. diff --git a/third_party/github.com/skeema/knownhosts/NOTICE b/third_party/github.com/skeema/knownhosts/NOTICE new file mode 100644 index 00000000000..12db8fc6506 --- /dev/null +++ b/third_party/github.com/skeema/knownhosts/NOTICE @@ -0,0 +1,13 @@ +Copyright 2022 Skeema LLC + +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.