Am 23.03.2020 um 20:12 schrieb Ruediger Pluem:


On 3/23/20 6:22 PM, Rainer Jung wrote:
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\])?$/

I think the backport stuff should not be in the list as it is often used in 
backport commits which I want to see run afterwards
through the tests for that branch.

Not sure how a multi-line commit message will be handled, ie. if the caret and dollar anchors are applied to every line and what happens if one line our of many matches.

The above pattern was meant to be applied to one-line commit messages only or phrased differently it should match the whole commit message, not only individual lines. In that case I would expect the backport part of the pattern to be no problem. A real backport commit message should also contain info like the revision number or the original commit message and would thus not match.

But I don't know whether the assumption about multi-line commit message matching is correct.

Regards,

Rainer

Reply via email to