Skip to content

Commit

Permalink
Modifies knctl task according to the new reorg proposal
Browse files Browse the repository at this point in the history
**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: tektoncd#386

Signed-off-by: Shiv Verma <[email protected]>
  • Loading branch information
pratap0007 committed Jun 30, 2020
1 parent 202655c commit 1982e6c
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions knctl/knctl-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 1982e6c

Please sign in to comment.