Last active
June 10, 2020 07:53
-
-
Save fvdnabee/0a97a58dce6be9baec4041e046f5682e to your computer and use it in GitHub Desktop.
argo use the same argument artifacts in multiple steps
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
# Like parameters, artifacts can be "passed" to a template as well. | |
# In this example, the 'kubectl-input-artifact' template requires | |
# that an an artifact named 'kubectl' is supplied as an input, | |
# which it will place in /usr/local/bin/kubectl. This keeps the | |
# template more composable/flexible, than if the location was | |
# hard-wired inside the template. | |
apiVersion: argoproj.io/v1alpha1 | |
kind: Workflow | |
metadata: | |
generateName: arguments-artifacts- | |
spec: | |
entrypoint: entrypoint | |
templates: | |
- name: entrypoint | |
steps: | |
- - name: first-step | |
template: kubectl-input-artifact | |
arguments: | |
artifacts: | |
- name: kubectl | |
http: | |
url: https://storage.googleapis.com/kubernetes-release/release/v1.8.0/bin/linux/amd64/kubectl | |
- - name: second-step | |
template: kubectl-input-artifact | |
arguments: | |
artifacts: | |
- name: kubectl | |
http: | |
url: https://storage.googleapis.com/kubernetes-release/release/v1.8.0/bin/linux/amd64/kubectl | |
- name: kubectl-input-artifact | |
inputs: | |
artifacts: | |
- name: kubectl | |
path: /usr/local/bin/kubectl | |
mode: 0755 | |
container: | |
image: alpine:latest | |
command: [sh, -c] | |
args: ["kubectl version"] |
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
# Like parameters, artifacts can be "passed" to a template as well. | |
# In this example, the 'kubectl-input-artifact' template requires | |
# that an an artifact named 'kubectl' is supplied as an input, | |
# which it will place in /usr/local/bin/kubectl. This keeps the | |
# template more composable/flexible, than if the location was | |
# hard-wired inside the template. | |
apiVersion: argoproj.io/v1alpha1 | |
kind: Workflow | |
metadata: | |
generateName: arguments-artifacts- | |
spec: | |
entrypoint: entrypoint | |
arguments: | |
artifacts: | |
- name: kubectl | |
http: | |
url: https://storage.googleapis.com/kubernetes-release/release/v1.8.0/bin/linux/amd64/kubectl | |
templates: | |
- name: entrypoint | |
steps: | |
- - name: first-step | |
template: kubectl-input-artifact | |
arguments: | |
artifacts: | |
- name: kubectl | |
from: "{workflow.artifacts.kubectl}" | |
- - name: second-step | |
template: kubectl-input-artifact | |
arguments: | |
artifacts: | |
- name: kubectl | |
from: "{workflow.artifacts.kubectl}" | |
- name: kubectl-input-artifact | |
inputs: | |
artifacts: | |
- name: kubectl | |
path: /usr/local/bin/kubectl | |
mode: 0755 | |
container: | |
image: alpine:latest | |
command: [sh, -c] | |
args: ["kubectl version"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment