Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #41 from deliveroo/PRIC-XXX/persist-command-status
Browse files Browse the repository at this point in the history
Set `pipefail` to ensure correct exit code
  • Loading branch information
alexstoick authored Nov 15, 2019
2 parents 73cfd1a + e1442b6 commit 15be381
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/pipeline/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ spec:
cpu: "{{ .Step.Resources.CPU }}"
memory: "{{ .Step.Resources.Memory }}"
command:
- "/bin/sh"
- "/bin/bash"
- "-c"
- "while true; do if [ -e /data/first-step.txt ]; then ((
- "set -o pipefail &&
while true; do if [ -e /data/first-step.txt ]; then ((
{{ range $index, $command := .Step.Commands }}
({{ $command }}) 2>&1 | tee /data/output/output-command-{{$index}}.log &&
{{ end }}
Expand Down

0 comments on commit 15be381

Please sign in to comment.