Closed AdamBrousseau closed 6 years ago
Propose we update the regex to something like this:
.*\bjenkins\b\s+\btest\b\s+\bsanity\b\s+(\ball\b|\bzlinux\b)\s+(\ball\b|\bjava9\b).*
A new comment for zLinux Java9 sanity would be one of the following
jenkins test sanity all all
jenkins test sanity all java9
jenkins test sanity zlinux all
Is it possible to support jenkins test sanity
as a short form for jenkins test sanity all all
?
.*\bjenkins\b\s+\btest\b\s+\bsanity\b(\n|$|\s+(\ball\b|\bzlinux\b)\s+(\ball\b|\bjava9\b).*)
Should allow jenkins test sanity
as well as jenkins test sanity all all
The other problem with this regex is that you can only request 1/all platforms (or versions). I.e. you can't get 2/3 platforms.
We could allow comma separated list of platforms or versions with this
.*\bjenkins\b\s+\btest\b\s+\bsanity\b\s*(\n|$|(all|([a-z]+,)*zlinux(,[a-z]+)*)\s+(all|(java[0-9]+,)*java9(,java[0-9]+)*))
This would allow any of the following (and more)
If jenkins test sanity zlinux
could be used as short form for jenkins test sanity zlinux all
then the "new syntax" would be compatible with the old.
should we be using the word "java" or "jdk" in these commands?
my vote is for jdk...
might be easier for casual reading if there were a p= (platforms) and j= (jdk) prefixes for those arguments to make it easier to understand "all all" / etc. but it's just a thought. unless others agree, I won't push for it.
I guess it look would look verbose in simple cases, though.
I think this addresses Pete's and both Mark's suggestions
.*\bjenkins\b\s+\btest\b\s+\bsanity\b\s*(\n|$|(p=all|([a-z]+,)*zlinux(,[a-z]+)*)\s*(\n|$|j=all|(jdk[0-9]+,)*jdk9(,jdk[0-9]+)*))
@AdamBrousseau For the lazy, can you supply what the new commands would look like?
Example
Jenkins test sanity
Jenkins test sanity p=all
Jenkins test sanity p=all j=all
Jenkins test sanity p=all jdk8,jdk9
Jenkins test sanity zlinux,plinux
Jenkins test sanity zlinux,plinux j=all
Jenkins test sanity zlinux,plinux jdk8,jdk9
Let me know if this is sufficient or if you want to see other use cases.
Are the expressions case-sensitive?
BTW, occurrences of \b\s+\b
can be just \s+
.
another option would "allpfm" and "alljdk" in case that is more attractive
Matches case insensitively and supports regular expressions
(from GitHub Pull Request Builder)
.*\bjenkins\s+test\s+sanity\b\s*(\n|$|(p=all|([a-z]+,)*zlinux(,[a-z]+)*)\s*(\n|$|j=all|(jdk[0-9]+,)*jdk9(,jdk[0-9]+)*))
Since we're bikeshedding anyway, the =
is kind of ugly. Is there a single world that would fill in for "all"? ie: use jdk
as a short hand for jdk=all
?
With commas separating the platforms and jdk versions, I don't see a need for the p=
or jdk=
prefixes.
Anybody in favour of supporting jenkins help
?
+1 to the "ugly" comment. As I mentioned before, it wasn't a strong suggestion and seems to add little value (if only one is specified, the entries in the other make it pretty clear which one is "all"). if both are specified, it isn't really important to know which is which. It's just that "all all" looks weird to me.
All in favour of going back to the following? Note all of these do the same thing (when zlinux,plinux are the only platforms and jdk8,jdk9 are the only supported jdks).
Updated #851 with README changes for trigger comment
related #660
We currently support the following PR builds via Github PR comments.
You can trigger these builds via PR commit comment
Jenkins compile
Jenkins compile zLinux
Jenkins compile pLinux
Jenkins test sanity
Jenkins test sanity zlinux
Jenkins test sanity plinux
Jenkins test extended
Jenkins test extended zlinux
Jenkins test extended plinux
Here is the regex from the zLinux Sanity build:
.*jenkins test sanity(.*zlinux.*)?(?! xlinux)(?! plinux).*
Each job has a slightly different regex which will allow that job to run if the comment matches the regexWe need to update the regex's to support more JDK versions (i.e. 8,10 for the immediate future). The current regex 'model' is harder to maintain because each job has to maintain the list of platforms it is not interested in. The alternate would be to have a regex that looks for
all
or<my_platform>
. This same problem will apply to JDK versions once we add 8,10.Final regex example
.*\bjenkins\s+test\s+sanity\b\s*($|\n|depends\s+.*|(all|([a-z]+,)*zlinux(,[a-z]+)*)\s*($|\n|depends\s+.*|all|(jdk[0-9]+,)*jdk8(,jdk[0-9]+)*)(\s+depends.*)?)