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

Need a way of not triggering if certain files are touched in a commit

    XMLWordPrintable

Details

    Description

      In our setup, we sometimes need to push in a single commit changes which affect several folders. Each of these folders is connected to a different Gerrit Trigger-based job (using files filter). However, these jobs are downstream one of another in Jenkins, and use artifacts one of another. So it would be best if only the "upstream-est" job was triggered, and let Jenkins trigger the dependent downstream jobs via Jenkins dependency mechanisms. Therefore an additional parameter in the Gerrit Trigger plugin would be welcome, allowing "Forbidden Files" to be added to Project configuration. For example, if project B is downstream of project A, in project B, we could set as "forbidden files" the files of project A. This way, if a change affects a file in A AND B, A will get triggered, not B, thanks to the forbidden file option. Jenkins would have an internal downstream trigger of B after A is completed successfully.

      Attachments

        Activity

          Code changed in jenkins
          User: Robert Sandell
          Path:
          gerrithudsontrigger/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritDynamicUrlProcessor.java
          gerrithudsontrigger/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/data/GerritProject.java
          gerrithudsontrigger/src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTrigger/config.jelly
          gerrithudsontrigger/src/main/webapp/trigger/help-DynamicTriggerConfiguration.html
          gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/job/rest/BuildCompletedRestCommandJobHudsonTest.java
          gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritProjectListTest.java
          gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/data/GerritProjectInterestingTest.java
          gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/data/GerritProjectWithFilesInterestingTest.java
          gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/mock/DuplicatesUtil.java
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/72cc1299486a7dd6a7dd6cf6d16d7412694ed964
          Log:
          Merge pull request #121 from yannack/forbiddenFilesOption

          Added a "Forbidden Files" optional parameter to Gerrit Projects [FIXED JENKINS-21232]

          Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/b2028be83114...72cc1299486a

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: gerrithudsontrigger/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritDynamicUrlProcessor.java gerrithudsontrigger/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/data/GerritProject.java gerrithudsontrigger/src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTrigger/config.jelly gerrithudsontrigger/src/main/webapp/trigger/help-DynamicTriggerConfiguration.html gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/job/rest/BuildCompletedRestCommandJobHudsonTest.java gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritProjectListTest.java gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/data/GerritProjectInterestingTest.java gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/data/GerritProjectWithFilesInterestingTest.java gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/mock/DuplicatesUtil.java http://jenkins-ci.org/commit/gerrit-trigger-plugin/72cc1299486a7dd6a7dd6cf6d16d7412694ed964 Log: Merge pull request #121 from yannack/forbiddenFilesOption Added a "Forbidden Files" optional parameter to Gerrit Projects [FIXED JENKINS-21232] Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/b2028be83114...72cc1299486a

          People

            jyrkiput jyrkiput
            yannack yannack bbbb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: