Date: Fri, 13 Apr 2012 12:47:49 -0700 (PDT) From: Scott Lavender To: repo-discuss@googlegroups.com Message-ID: <25435711.182.1334346469531.JavaMail.geo-discussion-forums@vbgj4> In-Reply-To: References: Subject: Re: Triggering Gerrit Trigger Plugin On Change To Sub-Directory MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_180_2010920.1334346469524" ------=_Part_180_2010920.1334346469524 Content-Type: multipart/alternative; boundary="----=_Part_181_17091174.1334346469529" ------=_Part_181_17091174.1334346469529 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit This is exactly what the plugin help describes: Then you can optionally provide the name of the specific file path(s) to trigger on. E.g. to only trigger builds if the patch set contains files in a certain folder. The same "pattern types" are available as above. If no file paths are added, all files will trigger a build. So for example to trigger on all files in any sub-folder called java: - *Type:* Path - *Pattern:* **/java/ On Friday, April 13, 2012 3:25:19 PM UTC-4, Scott Lavender wrote: > > I have a question on using the Gerrit Trigger Plugin with Jenkins. The > plugin help indicated that the following is possible. I have a repo > with to top level directories. I want to trigger two separate Jenkins > jobs to run tests when changes are made to either subdirectory: > > compute -> nova > glance > > I created two jobs and am having difficulty coming up with the proper > pattern to match so that these changes are detected. I have used this > plugin before with the project name and ** for the branch pattern > successfully. In this case, I want to trigger each job when changes > occur in the master branch within the two subdirectories shown above. > I've tried: > > Job: compute.review.glance > Project > Type: Path > Pattern: compute > > Branch > Type: Path > Pattern: **/glance > > Job: compute.review.nova > Project > Type: Path > Pattern: compute > > Branch > Type: Path > Pattern: **/nova > > > The jobs do not detect changes in the sub directories. I even tried a > trailing /* to no avail. Please, do you have any ideas here? > ------=_Part_181_17091174.1334346469529 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable This is exactly what the plugin help describes:

Then you can optionally provide the name of the specific file= path(s) to trigger on. E.g. to only trigger builds if the patch set contai= ns files in a certain folder. The same "pattern types" are available as abo= ve. If no file paths are added, all files will trigger a build.

<= p style=3D"font-family: Verdana, Helvetica, 'sans serif'; font-size: 11px; = color: rgb(0, 0, 0); line-height: normal; ">So for example to trigger on all files in any sub-fold= er called java:

=
  • Type: Path
  • Pattern: **/java/

On Friday, April 13, 2012 3:25:19 PM UTC-4, Scott Lavender = wrote:
I have a question on usi= ng the Gerrit Trigger Plugin with Jenkins. The
plugin help indicated that the following is possible. I have a repo
with to top level directories. I want to trigger two separate Jenkins
jobs to run tests when changes are made to either subdirectory:

compute -> nova
                    &= nbsp;glance

I created two jobs and am having difficulty coming up with the proper
pattern to match so that these changes are detected. I have used this
plugin before with the project name and ** for the branch pattern
successfully. In this case, I want to trigger each job when changes
occur in the master branch within the two subdirectories shown above.
I've tried:

Job: compute.review.glance
Project
    Type: Path
    Pattern: compute

Branch
    Type: Path
    Pattern: **/glance

Job: compute.review.nova
Project
    Type: Path
    Pattern: compute

Branch
    Type: Path
    Pattern: **/nova


The jobs do not detect changes in the sub directories. I even tried a
trailing /* to no avail. Please, do you have any ideas here?
------=_Part_181_17091174.1334346469529-- ------=_Part_180_2010920.1334346469524--