Last active
September 9, 2023 22:15
-
-
Save guidorice/d30765ee8bb93f32ec1ec981bd50e6ed to your computer and use it in GitHub Desktop.
argo workflows artifact-passing example (from https://github.com/argoproj/argo-workflows/blob/master/examples/artifact-passing.yaml)
This file contains hidden or 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 example demonstrates the ability to pass artifacts | |
| # from one step to the next. | |
| apiVersion: argoproj.io/v1alpha1 | |
| kind: Workflow | |
| metadata: | |
| generateName: artifact-passing- | |
| annotations: | |
| workflows.argoproj.io/description: | | |
| guidorice testing | |
| spec: | |
| serviceAccountName: argo-workflow | |
| entrypoint: artifact-example | |
| templates: | |
| - name: artifact-example | |
| steps: | |
| - - name: generate-artifact | |
| template: whalesay | |
| - - name: consume-artifact | |
| template: print-message | |
| arguments: | |
| artifacts: | |
| - name: message | |
| from: "{{steps.generate-artifact.outputs.artifacts.hello-art}}" | |
| - name: whalesay | |
| container: | |
| image: docker/whalesay:latest | |
| command: [sh, -c] | |
| args: ["sleep 1; cowsay hello world | tee /tmp/hello_world.txt"] | |
| outputs: | |
| artifacts: | |
| - name: hello-art | |
| path: /tmp/hello_world.txt | |
| - name: print-message | |
| inputs: | |
| artifacts: | |
| - name: message | |
| path: /tmp/message | |
| container: | |
| image: alpine:latest | |
| command: [sh, -c] | |
| args: ["cat /tmp/message"] | |
| tolerations: | |
| - key: "workers" | |
| operator: "Equal" | |
| value: "true" | |
| effect: "NoSchedule" | |
| nodeSelector: | |
| node-type: "workers" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example config from Argo Workflows 101 tutorial: