Hi,
I started using rules:changes
for 2 different reasons:
- in
workflow:rules
to avoid starting the pipeline if no file was changed; this is useful with git-flow releases, that otherwise will trigger a pipeline for develop because an (empty) merge commit is pushed - in single jobs to skip DB migrations in CD if no migration file was changed (DB migrations are described ad python files in django)
Now I’d like to expand the usage of the second point above to skip js tests if no js code was changed and so on…
But I noticed that rules
look at the latest commit only in a multiple-commit push. This means that if I push multiple commits at once, and the last one doesn’t contain migrations, my migrations won’t run.
I understand solving this problem means to get the file diff between HEAD and the last pipeline that succeeded but I wonder how changes
can be useful at all given the current implementation.
Any suggestion?