Continue on error
Is there a functionality that could make a task continue execution even there is an error ?
Context:
I am trying taskfile to do CI checks.
So I am currently doing python (pylint & bandit) & terraform (tflint & trivy) checks.
I migrated the checks for each tech in an included taskfile like this:
So in each of these taskfiles each check is a separate task.
For example the pylint checks can be executed as
python_tasks:run_pylint
, etc.
Naturally I setup the default to depend on each check (example with the python taskfile):
Now I have the below tasks defined to triger the included ones:
So when I run the task I want all the checks to happen (regardless if one of them fails).
Again example with the python tasks: if the run_pylint
check fails because there are pylint findings, the run_bandit
one should still execute.
And the same logic for the parent taskfile: if the python_checks
task fails the terraform_checks
one still executes.
What I have seen so far is the whole execution halts on error so even on python checks issues, the terraform checks also stop. Which defeats the whole purpose...
Now I could work around all that by setting ignore_error: true
on every task but then when this is all run in CI/CD everything will just exit with 0 (no matter the findings) so all tests will be marked successful (even if they weren't)...
What are my options here?
TL;DR: How can I make deps
finish even when errors in one of them occurs?0 Replies