Skip to content

Commit

Permalink
Referencing output artifacts from a container with retries was not fu…
Browse files Browse the repository at this point in the history
…nctioning (resolves argoproj#698)
  • Loading branch information
jessesuen committed Jan 25, 2018
1 parent bf2b376 commit 0b0b52c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions test/e2e/functional/retry-with-artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Verifies that retries with artifacts will propogate artifacts
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: retry-with-artifacts-
spec:
entrypoint: retry-with-artifacts
templates:
- name: retry-with-artifacts
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
retryStrategy:
limit: 4
container:
image: docker/whalesay:latest
command: [sh, -c]
args: ["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"]
1 change: 1 addition & 0 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ func (woc *wfOperationCtx) processNodeRetries(node *wfv1.NodeStatus) error {

if lastChildNode.Successful() {
node.Outputs = lastChildNode.Outputs.DeepCopy()
woc.wf.Status.Nodes[node.ID] = *node
woc.markNodePhase(node.Name, wfv1.NodeSucceeded)
return nil
}
Expand Down

0 comments on commit 0b0b52c

Please sign in to comment.