Skip to content

Commit

Permalink
update object-param-result example
Browse files Browse the repository at this point in the history
This commit adds check for params of the existing object-param-result example.

Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
  • Loading branch information
Yongxuanzhang authored and tekton-robot committed Feb 16, 2023
1 parent 7ba1769 commit e6742bb
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions examples/v1beta1/taskruns/alpha/object-param-result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,25 @@ spec:
IMAGE_URL: {type: string}
IMAGE_DIGEST: {type: string}
steps:
- name: echo-object-params
- name: validate-object-params
image: bash
args: [
"echo",
"--url=$(params.gitrepo.url)",
"--commit=$(params.gitrepo.commit)"
"$(params.gitrepo.url)",
"$(params.gitrepo.commit)"
]
script: |
if [[ $1 != "github.example.com" ]]; then
echo "Want: github.example.com, Got: $1"
exit 1
else
echo "validate the params.gitrepo.url successfully"
fi
if [[ $2 != "sha123" ]]; then
echo "Want: sha123, Got: $2"
exit 1
else
echo "validate the params.gitrepo.commit successfully"
fi
- name: write-object-result
image: bash:latest
script: |
Expand Down

0 comments on commit e6742bb

Please sign in to comment.