Can't get "negative readahead" to work

80 views
Skip to first unread message

Mark Syms

unread,
Jul 22, 2014, 3:00:33 AM7/22/14
to jenkins...@googlegroups.com
We have two types of builds on our Jenkins server, CI incremental builds and then (one for each CI job) a nightly build that does a full clean build for QA.

I want to create two views to show these separately. The nightly view is easy as all the jobs are called xxx_Nightly, however I can't get the reverse view to work. The help indicates that (?!_Nightly) should be the magic regex that is needed but I either end up with nothing selected or every build selected.

Does this negative readahed regex actually work for filtering jobs or am I just doing it wrong?

Thanks,

Mark

Daniel Beck

unread,
Jul 22, 2014, 3:38:21 AM7/22/14
to jenkins...@googlegroups.com

On 22.07.2014, at 09:00, Mark Syms <syms...@gmail.com> wrote:

> The help indicates that (?!_Nightly) should be the magic regex that is needed but I either end up with nothing selected or every build selected.
>
> Does this negative readahed regex actually work for filtering jobs or am I just doing it wrong?

There's a difference between lookahead (something not preceded by something else) and lookbehind (something not followed by something else). The example is a negative lookahead, in your situation you need negative lookbehind. The following should work:

.*(?<!_Nightly)

You could also install View Job Filters plugin and define the view in terms of the other view ("Other Views Filter", include unmatched; or "Unclassified Jobs"). These may have problems in some permissions configurations though.

Mark Syms

unread,
Jul 22, 2014, 4:06:32 AM7/22/14
to jenkins...@googlegroups.com
That did it, thanks Daniel.



--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/mXZdl8u722E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages