Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49922

job dsl: allow to specify a path when defining gerrit trigger

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • job-dsl-plugin
    • None

      When I specify on which Gerrit projects to trigger a build on, I would like to be able to consider only some sub-directories.

      We uses 'shared' git repositories for some stuff (configuration management, etc.) Gerrit OWNERS is used for the validation. And we have separated pipelines to deploy each perimeters. I wish my pipeline is trigerred only on changes on my sub-directories (or on common directories).

      I think it could be expressed with in the project definition used in gerrit trigger, as follow:

          triggers {
              gerrit {
                  events {
                      changeMerged()
                  }
                  project(myRepo, 'master', ["ANT:common/**", "ANT:mySubDir/**"])
              }
          }
      

      And it could be implemented in TriggerContext with com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.FilePath.

            daspilker Daniel Spilker
            mcoolive Cyril Martin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: