Allow environment variables for triggering gerrit projects

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      When creating a job, we have to specify what Gerrit project(s) to trigger a build on based on the following rules:

      At least one project and branch pattern needs to be specified for a build to be triggered,and you can specify as many gerrit project to trigger on as you want.

      Start by specifying the name of the Gerrit project in the left hand text field.
      You can specify the name pattern in three different ways, as provided by the "Type" drop-down menu.

      Plain: The exact name in Gerrit, case sensitive equality.
      Path: ANT style pattern. Ex: "/base/*"
      RegExp: Regular expression.
      Then provide the name of the branch(es) to trigger on. The same "pattern types" is available as above.
      So for example to trigger on all branches in the project you can specify:
      Type: Path
      Pattern: **
      You can add more branch patterns by clicking on "Add Branch" and more projects by clicking "Add Project".

      The same syntax works for specifying which file(s) to trigger on (this is only available in version 2.3 or higher of Gerrit).

      However, in order to improve its power even further, it could be possible to use $GERRIT_PROJECT as project pattern and $GERRIT_BRANCH as branch pattern (or any other environment variable). That would enable the user to create a single job to build several projects based on the incoming events from Gerrit to Jenkins.

            Assignee:
            rsandell
            Reporter:
            Thiago Crepaldi
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: