-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
introduce v1alpha2 api with auto conversion #1529
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,13 @@ metadata: | |
name: clustertasks.tekton.dev | ||
spec: | ||
group: tekton.dev | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true | ||
- name: v1alpha2 | ||
served: true | ||
storage: false | ||
Comment on lines
+20
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
names: | ||
kind: ClusterTask | ||
plural: clustertasks | ||
|
@@ -28,4 +35,3 @@ spec: | |
# starts to increment | ||
subresources: | ||
status: {} | ||
version: v1alpha1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This files contains |
||
apiVersion: tekton.dev/v1alpha1 | ||
apiVersion: tekton.dev/v1alpha2 | ||
kind: PipelineResource | ||
metadata: | ||
name: skaffold-image-leeroy-app | ||
|
@@ -26,7 +26,7 @@ roleRef: | |
name: cluster-admin | ||
apiGroup: rbac.authorization.k8s.io | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
apiVersion: tekton.dev/v1alpha2 | ||
kind: PipelineResource | ||
metadata: | ||
name: skaffold-image-leeroy-web-pipelinerun | ||
|
@@ -36,7 +36,7 @@ spec: | |
- name: url | ||
value: gcr.io/christiewilson-catfactory/leeroy-web | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
apiVersion: tekton.dev/v1alpha2 | ||
kind: PipelineResource | ||
metadata: | ||
name: skaffold-git-pipelinerun | ||
|
@@ -48,7 +48,7 @@ spec: | |
- name: url | ||
value: https://github.com/GoogleContainerTools/skaffold | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
apiVersion: tekton.dev/v1alpha2 | ||
kind: Task | ||
metadata: | ||
name: unit-tests | ||
|
@@ -70,7 +70,7 @@ spec: | |
args: | ||
- "pass" | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
apiVersion: tekton.dev/v1alpha2 | ||
kind: Task | ||
metadata: | ||
name: build-push | ||
|
@@ -79,13 +79,13 @@ spec: | |
resources: | ||
- name: workspace | ||
type: git | ||
params: | ||
- name: pathToDockerFile | ||
description: The path to the dockerfile to build | ||
default: /workspace/workspace/Dockerfile | ||
- name: pathToContext | ||
description: The build context used by Kaniko (https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts) | ||
default: /workspace/workspace | ||
params: | ||
- name: pathToDockerFile | ||
description: The path to the dockerfile to build | ||
default: /workspace/workspace/Dockerfile | ||
- name: pathToContext | ||
description: The build context used by Kaniko (https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts) | ||
default: /workspace/workspace | ||
outputs: | ||
resources: | ||
- name: builtImage | ||
|
@@ -100,9 +100,9 @@ spec: | |
command: | ||
- /kaniko/executor | ||
args: | ||
- --dockerfile=$(inputs.params.pathToDockerFile) | ||
- --dockerfile=$(params.pathToDockerFile) | ||
- --destination=$(outputs.resources.builtImage.url) | ||
- --context=$(inputs.params.pathToContext) | ||
- --context=$(params.pathToContext) | ||
--- | ||
#This task deploys with kubectl apply -f <filename> | ||
apiVersion: tekton.dev/v1alpha1 | ||
|
@@ -131,7 +131,7 @@ spec: | |
- "w" | ||
- "-i" | ||
- "$(inputs.params.yqArg)" | ||
- "$(inputs.params.path)" | ||
- "$kube(inputs.params.path)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, it looks like this line of code has one more word “kube” . |
||
- "$(inputs.params.yamlPathToImage)" | ||
- "$(inputs.resources.image.url)" | ||
- name: run-kubectl | ||
|
@@ -150,7 +150,7 @@ spec: | |
# pushed are the ones that are deployed (that would require using the digest of | ||
# the built image, see https://github.com/tektoncd/pipeline/issues/216). | ||
|
||
apiVersion: tekton.dev/v1alpha1 | ||
apiVersion: tekton.dev/v1alpha2 | ||
kind: Pipeline | ||
metadata: | ||
name: demo-pipeline | ||
|
@@ -239,7 +239,7 @@ spec: | |
- name: yamlPathToImage | ||
value: "spec.template.spec.containers[0].image" | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
apiVersion: tekton.dev/v1alpha2 | ||
kind: PipelineRun | ||
metadata: | ||
name: demo-pipeline-run-1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ KNATIVE_CODEGEN_PKG=${KNATIVE_CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 ./ven | |
# instead of the $GOPATH directly. For normal projects this can be dropped. | ||
${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \ | ||
github.com/tektoncd/pipeline/pkg/client github.com/tektoncd/pipeline/pkg/apis \ | ||
pipeline:v1alpha1 \ | ||
pipeline:v1alpha1,v1alpha2 \ | ||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt | ||
|
||
# Depends on generate-groups.sh to install bin/deepcopy-gen | ||
|
@@ -42,7 +42,7 @@ ${GOPATH}/bin/deepcopy-gen \ | |
# Knative Injection | ||
${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \ | ||
github.com/tektoncd/pipeline/pkg/client github.com/tektoncd/pipeline/pkg/apis \ | ||
"pipeline:v1alpha1" \ | ||
"pipeline:v1alpha1,v1alpha2" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This updates codegen to generate v1alpha1 and v1alpha2 clientset, informers, … |
||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt | ||
|
||
# Make sure our dependencies are up-to-date | ||
|
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.
This tells the webhook to do the conversion 👼