Question: How to upload reports after failed step without allowing failures
luke-riu opened this issue · 5 comments
I have the following steps
- git clone
- run unit tests
- upload report
to be able to upload the reports on a failed unit test, I need to set the unit tests as allow_failure: true
which makes it so that the pipeline succeeds, which I don't want. Is there a way to run the following step and still show the fail X ?
Thanks
Unfortunately, flow.ci doesn't support this scenario currently.
It is a really good question, I'll consider it in the next release.
Thanks 👍
Hi. I was wondering if this was resolved in the latest release. Thanks.
Hi, it has been solved by the post step which will be executed while the job goes to success, failed or cancelled status.
you could have a post
YAML block after steps
, the YAML format is the same as step
envs:
FLOW_WORKSPACE: "echo hello"
FLOW_VERSION: "echo version"
docker:
image: "helloworld:0.1"
steps:
- name: clone
bash: |
echo "git clone"
post:
- name: post-1
bash: "echo post-1"
- name: post-2
condition: |
return ${FLOWCI_STATUS} == "SUCCESS"
bash: "echo post-2"
Perfect. This is exactly what I need. It might be useful to place examples like this in the template projects to showcase it's abilities 👍
exactly, I'm working on it