mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-22 06:02:51 +00:00
Port openshift-client to v1beta1 🦇
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
This commit is contained in:
parent
0702a8e651
commit
4341bae32d
@ -52,14 +52,13 @@ oc policy add-role-to-user edit -z default -n <namespace>
|
||||
This `TaskRun` runs an `oc rollout` command to deploy the latest image version for `myapp` on OpenShift.
|
||||
|
||||
```
|
||||
apiVersion: tekton.dev/v1alpha1
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: TaskRun
|
||||
metadata:
|
||||
name: deploy-myapp
|
||||
spec:
|
||||
taskRef:
|
||||
name: openshift-client
|
||||
inputs:
|
||||
params:
|
||||
- name: ARGS
|
||||
value:
|
||||
@ -71,15 +70,15 @@ spec:
|
||||
The following `TaskRun` runs the commands against a different cluster than the one the `TaskRun` is running on. The cluster credentials are provided via a `PipelineResource` called `stage-cluster`.
|
||||
|
||||
```
|
||||
apiVersion: tekton.dev/v1alpha1
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: TaskRun
|
||||
metadata:
|
||||
name: deploy-myapp-stage
|
||||
spec:
|
||||
taskRef:
|
||||
name: openshift-client-kubecfg
|
||||
inputs:
|
||||
resources:
|
||||
inputs:
|
||||
- name: cluster
|
||||
resourceRef:
|
||||
name: stage-cluster
|
||||
|
@ -1,10 +1,10 @@
|
||||
apiVersion: tekton.dev/v1alpha1
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: openshift-client-kubecfg
|
||||
spec:
|
||||
inputs:
|
||||
resources:
|
||||
inputs:
|
||||
- name: cluster
|
||||
type: cluster
|
||||
params:
|
||||
@ -20,7 +20,7 @@ spec:
|
||||
steps:
|
||||
- name: oc
|
||||
image: quay.io/openshift/origin-cli:latest
|
||||
script: "$(inputs.params.SCRIPT)"
|
||||
script: "$(params.SCRIPT)"
|
||||
args:
|
||||
- "--kubeconfig /workspace/$(inputs.resources.cluster.name)/kubeconfig --context $(inputs.resources.cluster.name)"
|
||||
- "$(inputs.params.ARGS)"
|
||||
- "--kubeconfig /workspace/$(resources.inputs.cluster.name)/kubeconfig --context $(resources.inputs.cluster.name)"
|
||||
- "$(params.ARGS)"
|
||||
|
@ -1,9 +1,8 @@
|
||||
apiVersion: tekton.dev/v1alpha1
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: openshift-client
|
||||
spec:
|
||||
inputs:
|
||||
params:
|
||||
- name: SCRIPT
|
||||
description: The OpenShift CLI arguments to run
|
||||
@ -17,6 +16,6 @@ spec:
|
||||
steps:
|
||||
- name: oc
|
||||
image: quay.io/openshift/origin-cli:latest
|
||||
script: "$(inputs.params.SCRIPT)"
|
||||
script: "$(params.SCRIPT)"
|
||||
args:
|
||||
- "$(inputs.params.ARGS)"
|
||||
- "$(params.ARGS)"
|
||||
|
Loading…
Reference in New Issue
Block a user