[WIP] Adds support for v1 versions of Tekton#47
[WIP] Adds support for v1 versions of Tekton#47PuneetPunamiya wants to merge 1 commit intotektoncd:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
The following is the coverage report on the affected files.
|
Signed-off-by: PuneetPunamiya <ppunamiy@redhat.com>
2e4a710 to
76fe2f9
Compare
|
The following is the coverage report on the affected files.
|
| "github.com/tektoncd/catlin/pkg/parser" | ||
| "github.com/tektoncd/catlin/pkg/validator" | ||
| "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" | ||
| v1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" |
There was a problem hiding this comment.
nit:
| v1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" | |
| "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" |
| // case "clustertask": | ||
| // task := res.(*v1beta1.ClusterTask) | ||
| // t.collectOverSteps(task.Spec.Steps, task.ObjectMeta.Name, &result) |
| // const clusterTaskTest = ` | ||
| // apiVersion: tekton.dev/v1beta1 | ||
| // kind: ClusterTask | ||
| // metadata: | ||
| // name: hello-moto | ||
| // spec: | ||
| // steps: | ||
| // - name: nogood | ||
| // image: image1 | ||
| // script: | | ||
| // #!/usr/bin/env sh | ||
| // ' | ||
| // ` |
| // func Test_ClusterTaskParse(t *testing.T) { | ||
| // r := strings.NewReader(clusterTaskTest) | ||
| // parser := parser.ForReader(r) | ||
|
|
||
| res, err := parser.Parse() | ||
| assert.NilError(t, err) | ||
| // res, err := parser.Parse() | ||
| // assert.NilError(t, err) | ||
|
|
||
| tl := &taskLinter{ | ||
| res: res, | ||
| configs: configSh, | ||
| } | ||
| result := tl.Validate() | ||
| assert.Equal(t, 1, result.Errors) | ||
| } | ||
| // tl := &taskLinter{ | ||
| // res: res, | ||
| // configs: configSh, | ||
| // } | ||
| // result := tl.Validate() | ||
| // assert.Equal(t, 1, result.Errors) | ||
| // } |
There was a problem hiding this comment.
same or let's add t.Skip() if we need to keep it
|
|
||
| func registerSchema() { | ||
| beta1 := runtime.NewSchemeBuilder(v1beta1.AddToScheme) | ||
| beta1 := runtime.NewSchemeBuilder(v1beta1.AddToScheme, v1.AddToScheme) |
There was a problem hiding this comment.
let's rename the variable from beta1 to maybe builder
| switch kind { | ||
| case "Task": | ||
| return &v1beta1.Task{}, nil | ||
| return &v1.Task{}, nil |
There was a problem hiding this comment.
should we add tests for both v1 and v1beta1 to ensure things are working for both API version ?
|
@PuneetPunamiya: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
No description provided.