Am 23.03.2020 um 16:56 schrieb Joe Orton:
On Sat, Feb 08, 2020 at 12:01:29PM +0100, Luca Toscano wrote:
Hi everybody,
Travis is able to read commit messages and skip the CI workflow if the
"[skip ci]" magic sequence is added somewhere. I keep forgetting about
it too, but it would be nice if we could start using it to avoid using
CI resources/workers when not needed (like docs changes, entries in
STATUS, etc..). I didn't find a way to instruct Travis to avoid
triggering a build if only certain file types are committed, so the
only solution for the moment is to manually add the aforementioned
sequence :(
It is not a big deal to trigger builds even for docs etc.., but the
ASF resources/workers are limited (and shared among projects IIUC) so
I am only suggesting to be good neighbors :) If this is totally insane
or unacceptable I'll back off and stop vouching for it I promise!
I found a new option here while playing with conditionals, we can skip
an entire build based on the commit message, it appears -
https://github.com/apache/httpd/pull/87/commits/7dd995c555ac0aea6cb3d58634750e2e076eb0cc
so this could catch a lot of the quite pointless Travis runs for STATUS
changes by filtering by commit message, something like...
if: (branch != "2.4.x" and commit_message !~ /^[Tt]ransforms$/) or
(branch = "2.4.x" and commit_message !~
/^([Pp]ropose|[Vv]ote|[Tt]ransforms)$/)
anything else??
Since I forgot the [skip ci] today, I too a little time to inspect svn
log for STATUS and arrived at the following, probably not maintainable
regexp (perl notation) for 2.4.x:
/^i?(\* ?)?([0-9] *)?([sS]ome +|[mM]ore +|[aA]dd( a)? +|[eE]asy
+|[qQ]uick +|[sS]mall +|[uU]pdate( after)? +)?([bB]ackport(ed)?
+)?([pP]ropos(e|als?),?( *((and)?|\/|\+) *([vV]ote)?)?|[vV]otes?,?(
*((and)?|\/|\+)
*([pP]ropos(e|als?)|[pP]romot(e|ion)s?|[cC]omments?))?|[pP]romot(e|ion)s?|[cC]omment|[nN]ote|[dD]one|[mM]erged|[cC]ommitted|[bB]ackport(ed)?)[\.:!]?(
*\[skip ci\])?$/
It is roughly like yours, but allows a few prefixes and suffixes around
the magic words plus a few more of them and some frequent combinations.
Regards,
Rainer