From 99ec25a34cb248f2cc448631357f301932d6ef1d Mon Sep 17 00:00:00 2001 From: Shrubberer <90840584+Shrubberer@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:48:26 +0300 Subject: [PATCH] Update openshift-client.yaml with optional results field Added a results field with an optional RESULT to emit output for use in pipeline or next tasks. The default value is set to an empty string according to TEP-0048: Task Results without Results. --- task/openshift-client/0.2/openshift-client.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/task/openshift-client/0.2/openshift-client.yaml b/task/openshift-client/0.2/openshift-client.yaml index ef1fdf7390..732d9c7d98 100644 --- a/task/openshift-client/0.2/openshift-client.yaml +++ b/task/openshift-client/0.2/openshift-client.yaml @@ -38,6 +38,12 @@ spec: description: The OpenShift Version to use type: string default: "4.7" + + results: + - name: RESULT + description: Can be used to store output in order to be used by following tasks (with tasks.taskname.results.RESULT). Default value is empty string + type: string + steps: - name: oc image: quay.io/openshift/origin-cli:$(params.VERSION) @@ -50,5 +56,7 @@ spec: [[ "$(workspaces.kubeconfig-dir.bound)" == "true" ]] && \ [[ -f $(workspaces.kubeconfig-dir.path)/kubeconfig ]] && \ export KUBECONFIG=$(workspaces.kubeconfig-dir.path)/kubeconfig - + + echo "" > $(results.RESULT.path) + $(params.SCRIPT)