> I have a question on using the Gerrit Trigger Plugin with Jenkins. The
> plugin help indicated that the following is possible.
Which part of the help? I'm pretty sure what you want to do isn't
possible by just configuring the plugin.
> 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
You're configuring a restriction on the branch name, not the path of
the modified files. The pattern is however of the "path" type, but
that doesn't change what we're matching against.
[...]
--
Magnus Bäck
ba...@google.com
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:
> 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/
Okay, so there actually is such a feature. It isn't shown in the GUI
examples at https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger
so I assumed it didn't exist.
However, according to what you write in your original post, you're
nevertheless using the branch condition text field when you should be
using the text field for file paths. Reading the source code, this
feature is only enabled if the Gerrit you're running is sufficiently
new (2.2.3+). If it is, there will be a separate set of widgets below
the branch selection widgets to allow you to add and delete file paths
to trigger on.
--
Magnus Bäck
ba...@google.com
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
Scott Lavender | Cloud Release Engineer
_____________________________________ _______
Phone 678.554.3403 • Cell 770.361.5940
slav...@internap.com • www.internap.com
INTERNAP ®
connectivity | colocation | managed hosting | cloud
One Ravinia Drive • Suite 1300 • Atlanta • GA • 30346
Jason
Now, as we now know, the next major release turned out to be Gerrit 2.3 and we ended up with the wrong version warning in Gerrit Trigger plug-in. But don't worry, the Gerrit Trigger guys, Robert Sandell and Tomas Westling, has promised to fix the warning.
Note: If you run a -SNAPSHOT build of Gerrit, all features will be enabled in the Gerrit Trigger plug-in, since we cannot really know what features have been cherry-picked into Gerrit (but with a small warning/notification on the "Manage Jenkins"-page).
/Gustaf
Jason
> Phone 678.554.3403 . Cell 770.361.5940
> slav...@internap.com . www.internap.com
>
> INTERNAP ®
> connectivity | colocation | managed hosting | cloud
>
> One Ravinia Drive . Suite 1300 . Atlanta . GA . 30346
>
>
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
--