forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: exit handler variables don't get resolved correctly. Fixes argop…
…roj#10393 (argoproj#10449) Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>
- Loading branch information
1 parent
43cb4f6
commit 5c3c3b3
Showing
5 changed files
with
165 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
name: workflow-hook-parameter | ||
spec: | ||
entrypoint: run-test | ||
templates: | ||
- name: run-test | ||
container: | ||
name: runner | ||
image: 'argoproj/argosay:v2' | ||
command: ['sh','-c'] | ||
args: | ||
- exit 0 | ||
- name: cowsay | ||
inputs: | ||
parameters: | ||
- name: ternary | ||
- name: status | ||
container: | ||
image: 'argoproj/argosay:v2' | ||
command: ['bash','-c'] | ||
args: | ||
- | | ||
echo "{{inputs.parameters.ternary}}" | ||
echo "{{inputs.parameters.status}}" | ||
[[ "{{inputs.parameters.ternary}}" = "{{inputs.parameters.status}}" ]] | ||
hooks: | ||
exit: | ||
template: cowsay | ||
arguments: | ||
parameters: | ||
- name: ternary | ||
value: '{{= workflow.status == "Succeeded" ? "Succeeded" : "Failed" }}' | ||
- name: status | ||
value: '{{= workflow.status }}' |
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
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
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