From 2fbda5f3b59197f388c0942e9db84dc5173ad3fa Mon Sep 17 00:00:00 2001 From: Christie Wilson Date: Fri, 7 Aug 2020 17:16:04 -0400 Subject: [PATCH] =?UTF-8?q?Make=20this=20example=20actually=20run=20?= =?UTF-8?q?=F0=9F=8F=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The examples should at the least contain Runs that execute them (and even better, should include an assertion that verifies they did what was expected) otherwise all that is being verified is that the spec is valid. --- examples/v1beta1/taskruns/task-result.yaml | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/v1beta1/taskruns/task-result.yaml b/examples/v1beta1/taskruns/task-result.yaml index b22fcabcb10..850608a0ea2 100644 --- a/examples/v1beta1/taskruns/task-result.yaml +++ b/examples/v1beta1/taskruns/task-result.yaml @@ -1,24 +1,24 @@ apiVersion: tekton.dev/v1beta1 -kind: Task +kind: TaskRun metadata: - name: print-date - annotations: + generateName: print-date- +spec: + taskSpec: description: | A simple task that prints the date. -spec: - results: - - name: current-date-unix-timestamp - description: The current date in unix timestamp format - - name: current-date-human-readable - description: The current date in human readable format - steps: - - name: print-date-unix-timestamp - image: bash:latest - script: | - #!/usr/bin/env bash - date +%s | tee /tekton/results/current-date-unix-timestamp - - name: print-date-human-readable - image: bash:latest - script: | - #!/usr/bin/env bash - date | tee /tekton/results/current-date-human-readable + results: + - name: current-date-unix-timestamp + description: The current date in unix timestamp format + - name: current-date-human-readable + description: The current date in human readable format + steps: + - name: print-date-unix-timestamp + image: bash:latest + script: | + #!/usr/bin/env bash + date +%s | tee /tekton/results/current-date-unix-timestamp + - name: print-date-human-readable + image: bash:latest + script: | + #!/usr/bin/env bash + date | tee /tekton/results/current-date-human-readable