Closed afeefghannam89 closed 11 months ago
@widhalmt what do you think about this? We should use in this case a lint job for the complete collection not like now, link_kiban, lint_beats, lint_elasticseach ......... the full lint job will take about 75 seconds. I do not think it will be a remarkable difference in time between the small lint job and the full one.
Yes. I agree with you. Separate linters only give overhead but as you said, it's just about a few seconds.
Having linters in the specific jobs and running a linter in the same pipeline before the whole tests only makes sense, if we bring back fail-fast
. As I understand, GitHub will stop executing pipelines when one check has failed. This has drawbacks and benefits. But if we bring it back, running a linter before a pipeline helps with not wasting ressources for checks that won't work anyway.
I've created a branch to test using a reusable workflow for linting.
yamllint .
and all roles are linted using ansible-lint roles/
. yamllint roles/kibana
and ansible-lint roles/kibana
. This happens as the first job within the given (role specific) workflow.This is just a first draft on how this could be done.
If you have any ideas or suggestions on how to better deal with the issue, please let me know.
It will be good to take out all lint jobs from all workflows files and build a separated linter workflow. Other corresponding workflows will only run if linter workflows ended successfully. What we achieve with this?
01- Compact code 02- Now, many pipelines/workflows will run if a change happens on
.config/ansible-lint.yml
or.yamllint
. Only linter pipeline should be run in this case.