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.
Implementation for allowing access to global parameters in workflow (a…
…rgoproj#571) * Implementation for allowing access to global parameters in workflow without need to define them in inputs or passing them around * Fix a debug change back to original form * Change error string as requested
- Loading branch information
1 parent
c5ac5bf
commit b6e6713
Showing
7 changed files
with
180 additions
and
14 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: global-parameters-complex- | ||
spec: | ||
entrypoint: test-workflow | ||
# Parameters can be passed/overridden via the argo CLI. | ||
# To override the printed message, run `argo submit` with the -p option: | ||
# $ argo submit examples/arguments-parameters.yaml -p message="goodbye world" | ||
arguments: | ||
parameters: | ||
- name: message1 | ||
value: hello world | ||
- name: message2 | ||
value: foo bar | ||
|
||
templates: | ||
- name: test-workflow | ||
inputs: | ||
parameters: | ||
- name: message1 | ||
- name: message-internal | ||
value: "{{workflow.parameters.message1}}" | ||
steps: | ||
- - name: step1 | ||
template: whalesay2 | ||
arguments: | ||
parameters: | ||
- name: message1 | ||
value: world hello | ||
- name: message2 | ||
value: "{{inputs.parameters.message1}}" | ||
- name: message3 | ||
value: "{{workflow.parameters.message2}}" | ||
- name: message4 | ||
value: "{{inputs.parameters.message-internal}}" | ||
|
||
|
||
- name: whalesay2 | ||
inputs: | ||
parameters: | ||
- name: message1 | ||
- name: message2 | ||
- name: message3 | ||
- name: message4 | ||
container: | ||
image: docker/whalesay:latest | ||
command: [cowsay] | ||
args: ["Global 1: {{workflow.parameters.message1}} Input 1: {{inputs.parameters.message1}} Input 2/Steps Input 1/Global 1: {{inputs.parameters.message2}} Input 3/Global 2: {{inputs.parameters.message3}} Input4/Steps Input 2 internal/Global 1: {{inputs.parameters.message4}}"] |
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,20 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: global-parameters- | ||
spec: | ||
entrypoint: whalesay1 | ||
# Parameters can be passed/overridden via the argo CLI. | ||
# To override the printed message, run `argo submit` with the -p option: | ||
# $ argo submit examples/arguments-parameters.yaml -p message="goodbye world" | ||
arguments: | ||
parameters: | ||
- name: message | ||
value: hello world | ||
|
||
templates: | ||
- name: whalesay1 | ||
container: | ||
image: docker/whalesay:latest | ||
command: [cowsay] | ||
args: ["{{workflow.parameters.message}}"] |
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
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