From 1982e6c48d6aaf47a98e89aa6fe6d59391b6b118 Mon Sep 17 00:00:00 2001 From: pratap0007 Date: Tue, 30 Jun 2020 18:11:46 +0530 Subject: [PATCH] Modifies knctl task according to the new reorg proposal **NOTE: This only modifies the content of the yaml, changing the location of the file will be done in a different commit to make review easier Changes include: - adds version label - adds a minimum pipeline versions supported by the task - adds tags for task - adds display name for task - modified description to add a summary Issue: #386 Signed-off-by: Shiv Verma --- knctl/knctl-deploy.yaml | 51 +++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/knctl/knctl-deploy.yaml b/knctl/knctl-deploy.yaml index fbfa22e94c..dc0ff9435b 100644 --- a/knctl/knctl-deploy.yaml +++ b/knctl/knctl-deploy.yaml @@ -2,28 +2,39 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: knctl-deploy + labels: + app.kubernetes.io/version: "0.1" + annotations: + tekton.dev/pipelines.minVersion: "0.12.1" + tags: deploy + displayName: "knctl deploy" spec: + description: >- + This Task deploys (or update) a Knative service. + + It uses knctl for that, and supports only the deploy subcommand as of today. + params: - - name: service - description: Name of the service to deploy + - name: service + description: Name of the service to deploy resources: inputs: - - name: image - type: image + - name: image + type: image steps: - # the first step is required as knctl doesn't support inCluster configuration. - - name: kubeconfig - image: gcr.io/cloud-builders/kubectl # it is huge - command: ["/bin/bash"] - args: - - -c - - mkdir -p /tekton/home/.kube; kubectl config view > /tekton/home/.kube/config - - name: rollout - image: quay.io/openshift-pipeline/knctl - command: ["/usr/bin/knctl"] - args: - - deploy - - --service - - $(params.service) - - --image - - $(resources.inputs.image.url) + # the first step is required as knctl doesn't support inCluster configuration. + - name: kubeconfig + image: gcr.io/cloud-builders/kubectl # it is huge + command: ["/bin/bash"] + args: + - -c + - mkdir -p /tekton/home/.kube; kubectl config view > /tekton/home/.kube/config + - name: rollout + image: quay.io/openshift-pipeline/knctl + command: ["/usr/bin/knctl"] + args: + - deploy + - --service + - $(params.service) + - --image + - $(resources.inputs.image.url)