Closed iilyak closed 6 years ago
So I wanted to make sure this wasn't a regression and I don't think it is. The TL;DR is you need to put an exit: 42
(or whatever non zero exit code you want) on your ensure.ssh.keys
.
Here is the latest version:
03:40 PM ✔ kcmerrill tmp ] alfred
pipeline | Echo the superhero name
should.fail | failme
03:40 PM ✔ kcmerrill tmp ] alfred pipeline
[ 0s] (27 Dec 17 15:41 MST) pipeline started [] Echo the superhero name
[ 0s] (27 Dec 17 15:41 MST) pipeline setup should.fail
[ 0s] (27 Dec 17 15:41 MST) should.fail started [] failme
[ 0s] (27 Dec 17 15:41 MST) ls: /tmp/idonotexistordoi: No such file or directory
[ 0s] (27 Dec 17 15:41 MST) should.fail command failed
[ 0s] (27 Dec 17 15:41 MST) should.fail ✘ failed [] elapsed time '0s'
[ 0s] (27 Dec 17 15:41 MST) made it here
[ 0s] (27 Dec 17 15:41 MST) pipeline ✔ ok [] elapsed time '0s'
03:41 PM ✔ kcmerrill tmp ]
Here is the previous version:
03:40 PM ✔ kcmerrill tmp ] alfred
[pipeline] Echo the superhero name
[should.fail] failme
03:40 PM ✔ kcmerrill tmp ] alfred pipeline
[should.fail] failme (Args: [])
ls: /tmp/idonotexistordoi: No such file or directory
---
✘ should.fail FAILED
[pipeline] Echo the superhero name (Args: [])
made it here
---
✔ pipeline DONE
03:40 PM ✔ kcmerrill tmp ] cat alfred.yml
should.fail:
summary: failme
command: |
ls -alh /tmp/idonotexistordoi
pipeline:
summary: Echo the superhero name
setup: should.fail
command: |
echo "made it here"
03:40 PM ✔ kcmerrill tmp ]
Both using the same pipeline.
I am testing the
setup
functionality in context of https://github.com/kcmerrill/alfred/issues/53#issuecomment-354180384. Here is my minimalalfred.yml
fileHere is the output: