Last active
April 24, 2020 12:03
-
-
Save praveen4g0/5390fb512d7b38d32e184dfbbd98c1f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: tekton.dev/v1beta1 | |
kind: Task | |
metadata: | |
name: task-echo-message | |
spec: | |
params: | |
- name: MESSAGE | |
type: string | |
default: "Hello World" | |
steps: | |
- name: echo | |
image: ubuntu | |
script: | | |
#!/usr/bin/env bash | |
set -euxo pipefail | |
sleep 90s | |
echo "$(inputs.params.MESSAGE)" | |
--- | |
apiVersion: tekton.dev/v1beta1 | |
kind: PipelineRun | |
metadata: | |
name: pipelinerun-timeout | |
spec: | |
# 1 hour and half timeout | |
timeout: 1h30m | |
pipelineSpec: | |
params: | |
- name: MORNING_GREETINGS | |
description: "morning greetings, default is Good Morning!" | |
type: string | |
default: "Good Morning!" | |
- name: NIGHT_GREETINGS | |
description: "Night greetings, default is Good Night!" | |
type: string | |
default: "Good Night!" | |
tasks: | |
# Task to display morning greetings | |
- name: echo-good-morning | |
taskRef: | |
name: task-echo-message | |
params: | |
- name: MESSAGE | |
value: $(params.MORNING_GREETINGS) | |
# Task to display night greetings | |
- name: echo-good-night | |
taskRef: | |
name: task-echo-message | |
params: | |
- name: MESSAGE | |
value: $(params.NIGHT_GREETINGS) | |
params: | |
- name: MORNING_GREETINGS | |
value: "Good Morning, Bob!" | |
- name: NIGHT_GREETINGS | |
value: "Good Night, Bob!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment