Skip to content

Commit

Permalink
Trying to fix the CI
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
  • Loading branch information
vdemeester committed Oct 9, 2023
1 parent 54c7e7b commit d0b6603
Show file tree
Hide file tree
Showing 29 changed files with 59 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .tekton/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=quay.io/vdemeest/buildkit-tekton
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: buildkit-tekton-on-pull-request
Expand Down
2 changes: 1 addition & 1 deletion .tekton/push.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=quay.io/vdemeest/buildkit-tekton
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: buildkit-tekton-on-push
Expand Down
2 changes: 1 addition & 1 deletion .tekton/tasks/buildah.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: buildah
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.buildah
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GOLANG_IMAGE=golang:1.18.6-alpine@sha256:5b58b2e5963db4cc97d5c5d2580744713303e8ddc979ff89d939c559502ec263
ARG GOLANG_IMAGE=golang:1.20-alpine@sha256:d0edf023da755c2917ae42dd57e4f745d82c8c9ee0b510b4d3da2a80da11c230

FROM ${GOLANG_IMAGE} AS build
WORKDIR /src
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GOLANG_IMAGE=golang:1.18.6-alpine@sha256:5b58b2e5963db4cc97d5c5d2580744713303e8ddc979ff89d939c559502ec263
ARG GOLANG_IMAGE=golang:1.20-alpine@sha256:d0edf023da755c2917ae42dd57e4f745d82c8c9ee0b510b4d3da2a80da11c230

FROM ${GOLANG_IMAGE} AS build-buildkit
WORKDIR /src
Expand Down
2 changes: 1 addition & 1 deletion examples/0-taskrun-simple/run-with-script.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
generateName: simple-task-
Expand Down
2 changes: 1 addition & 1 deletion examples/0-taskrun-simple/run-with-steptemplate.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
generateName: simple-task-
Expand Down
2 changes: 1 addition & 1 deletion examples/0-taskrun-simple/run.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
generateName: simple-task-
Expand Down
2 changes: 1 addition & 1 deletion examples/0-taskrun-with-params/run-with-default.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
generateName: simple-task-
Expand Down
2 changes: 1 addition & 1 deletion examples/0-taskrun-with-params/run-with-value.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
generateName: simple-task-
Expand Down
4 changes: 2 additions & 2 deletions examples/1-pipelinerun-go/run.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
Expand Down Expand Up @@ -44,7 +44,7 @@ spec:
taskSpec:
steps:
- name: unit-test
image: docker.io/library/golang:1.17
image: docker.io/library/golang:1.20
script: |
pwd; ls -la; ls -la *; echo $PATH
go test ./...
Expand Down
2 changes: 1 addition & 1 deletion examples/1-pipelinerun-simple/run.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: simple-pipeline-
Expand Down
2 changes: 1 addition & 1 deletion examples/1-pipelinerun-with-params/run-with-default.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: simple-task-
Expand Down
2 changes: 1 addition & 1 deletion examples/1-pipelinerun-with-params/run.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: simple-task-
Expand Down
8 changes: 4 additions & 4 deletions examples/1-pipelinerun-with-workspaces/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
accessModes:
- ReadWriteOnce
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: fetch-secure-data
Expand All @@ -65,7 +65,7 @@ spec:
exit 1
fi
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: print-data
Expand All @@ -80,7 +80,7 @@ spec:
image: ubuntu
script: cat $(workspaces.storage.path)/$(params.filename)
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: fetch-and-print-recipe
Expand Down Expand Up @@ -113,7 +113,7 @@ spec:
- name: storage
workspace: shared-data
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: recipe-time-
Expand Down
2 changes: 1 addition & 1 deletion examples/2-taskref-oci/pipelinerun.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: golang-test-pipeline-run
Expand Down
2 changes: 1 addition & 1 deletion examples/2-taskref-oci/taskrun.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
name: golang-test-pipeline-run
Expand Down
2 changes: 1 addition & 1 deletion examples/3-context-and-ref/git-clone.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: git-clone
Expand Down
2 changes: 1 addition & 1 deletion examples/3-context-and-ref/golang-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: golang-test
Expand Down
2 changes: 1 addition & 1 deletion examples/3-context-and-ref/run.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend:test
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: golang-test-pipeline-run
Expand Down
18 changes: 9 additions & 9 deletions pkg/tekton/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ not a valid yaml`},
{yaml: "kind: Task"},
{yaml: `apiVersion: foo.bar/baz
kind: Foo`},
{yaml: `apiVersion: tekton.dev/v1beta1
{yaml: `apiVersion: tekton.dev/v1
kind: Task
spec:
steps: "foo"`},
Expand All @@ -113,23 +113,23 @@ func TestParseTektonYAML(t *testing.T) {
yaml string
expected interface{}
}{{
yaml: `apiVersion: tekton.dev/v1beta1
yaml: `apiVersion: tekton.dev/v1
kind: Task`,
expected: &v1beta1.Task{},
}, {
yaml: `apiVersion: tekton.dev/v1beta1
yaml: `apiVersion: tekton.dev/v1
kind: TaskRun`,
expected: &v1beta1.TaskRun{},
}, {
yaml: `apiVersion: tekton.dev/v1beta1
yaml: `apiVersion: tekton.dev/v1
kind: Pipeline`,
expected: &v1beta1.Pipeline{},
}, {
yaml: `apiVersion: tekton.dev/v1beta1
yaml: `apiVersion: tekton.dev/v1
kind: PipelineRun`,
expected: &v1beta1.PipelineRun{},
}, {
yaml: `apiVersion: tekton.dev/v1beta1
yaml: `apiVersion: tekton.dev/v1
kind: Task
metadata:
name: foo
Expand All @@ -153,7 +153,7 @@ spec:
},
},
}, {
yaml: `apiVersion: tekton.dev/v1beta1
yaml: `apiVersion: tekton.dev/v1
kind: TaskRun
spec:
taskRef:
Expand All @@ -166,7 +166,7 @@ spec:
},
},
}, {
yaml: `apiVersion: tekton.dev/v1beta1
yaml: `apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: bar
Expand All @@ -187,7 +187,7 @@ spec:
},
},
}, {
yaml: `apiVersion: tekton.dev/v1beta1
yaml: `apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: bar-
Expand Down
9 changes: 5 additions & 4 deletions pkg/tekton/pipelinerun.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ func validatePipelineRun(ctx context.Context, pr *v1.PipelineRun) error {
// SilentlyIgnore ServiceAccountName
// SilentlyIgnore ServiceAccountNames
// SilentlyIgnore Status
if pr.Spec.Timeouts != nil {
return errors.New("Timeouts are not supported")
}
// SilentryIgnore Timeouts
// if pr.Spec.Timeouts != nil {
// return errors.New("Timeouts are not supported")
// }
// We might be able to silently ignore
if pr.Spec.TaskRunTemplate.PodTemplate != nil {
return errors.New("PodTemplate are not supported")
Expand Down Expand Up @@ -233,5 +234,5 @@ func validatePipeline(ctx context.Context, p v1.PipelineSpec) error {

func isTektonTask(typeMeta runtime.TypeMeta) bool {
return (typeMeta.APIVersion == "" && typeMeta.Kind == "") ||
(typeMeta.APIVersion == "tekton.dev/v1beta1" && typeMeta.Kind == "Task")
(typeMeta.APIVersion == "tekton.dev/v1" && typeMeta.Kind == "Task")
}
12 changes: 6 additions & 6 deletions pkg/tekton/testdata/another-pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ roleRef:
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: "unit.tests"
Expand All @@ -39,7 +39,7 @@ spec:
# Copied from https://github.com/tektoncd/catalog/blob/v1beta1/git/git-clone.yaml
# With a few fixes being ported over in https://github.com/tektoncd/catalog/pull/290
# Post #1839 we can refer to the remote Task in a registry or post #2298 in git directly
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: git-clone
Expand Down Expand Up @@ -120,7 +120,7 @@ spec:
# Copied from https://github.com/tektoncd/catalog/blob/v1beta1/kaniko/kaniko.yaml
# with a few fixes that will be port over in https://github.com/tektoncd/catalog/pull/291
# Post #1839 we can refer to the remote Task in a registry or post #2298 in git directly
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: kaniko
Expand Down Expand Up @@ -186,7 +186,7 @@ spec:
cat $(params.CONTEXT)/image-digested | jq '.[0].value' -rj | tee /tekton/results/IMAGE_DIGEST
---
# This task deploys with kubectl apply -f <filename>
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: demo-deploy-kubectl
Expand Down Expand Up @@ -223,7 +223,7 @@ spec:
---
# This Pipeline Builds two microservice images(https://github.com/GoogleContainerTools/skaffold/tree/master/examples/microservices)
# from the Skaffold repo (https://github.com/GoogleContainerTools/skaffold) and deploys them to the repo currently running Tekton Pipelines.
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: "demo.pipeline"
Expand Down Expand Up @@ -311,7 +311,7 @@ spec:
- name: source
workspace: git-source
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: demo-pipeline-run-1
Expand Down
2 changes: 1 addition & 1 deletion pkg/tekton/testdata/git-clone.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: git-clone
Expand Down
2 changes: 1 addition & 1 deletion pkg/tekton/testdata/golang-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: golang-test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# \ /
# -- (lower) ------------

apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: parallel-pipeline
Expand Down Expand Up @@ -93,7 +93,7 @@ spec:
- name: files
workspace: ws
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: persist-param
Expand All @@ -111,7 +111,7 @@ spec:
workspaces:
- name: task-ws
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: to-upper
Expand All @@ -132,7 +132,7 @@ spec:
workspaces:
- name: w
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: to-lower
Expand All @@ -153,7 +153,7 @@ spec:
workspaces:
- name: w
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: result-reporter
Expand All @@ -169,7 +169,7 @@ spec:
image: ubuntu
script: echo $(params.result-to-report)
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: validator
Expand All @@ -184,7 +184,7 @@ spec:
workspaces:
- name: files
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: parallel-pipelinerun-
Expand Down
2 changes: 1 addition & 1 deletion pkg/tekton/testdata/pipelinerun.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#syntax=ghcr.io/vdemeester/buildkit-tekton/frontend:test
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: golang-test-pipeline-run
Expand Down
Loading

0 comments on commit d0b6603

Please sign in to comment.