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

Git Plugin: disabling any and all automatic scheduling of other builds

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None

      In my usage of the Git Plugin, I see that the Git Plugin schedules other builds.

      Seen branch in repository fork/feature/PROJECT-103-feature-c
      Seen branch in repository fork/feature/PROJECT-102-feature-b
      Seen branch in repository fork/feature/PROJECT-102-feature-a
      Seen branch in repository fork/feature/feature-test-1
      Seen branch in repository fork/master
      Seen branch in repository upstream/master
      Seen 6 remote branches
      Multiple candidate revisions
      Scheduling another build to catch up with project-integration
      

      All my builds are fully directed and controlled externally, I do not need the Git Plugin to intervene by scheduling other builds.

      I need a way to completely disable the scheduling of other builds by the Git Plugin.

          [JENKINS-26664] Git Plugin: disabling any and all automatic scheduling of other builds

          Mark Waite added a comment -

          Please upload the job configuration file for the specific job. Those messages seem to indicate that you have placed a wildcard in the "Branches to build" field but want the plugin to not build changes when they are detected on a branch matching the wildcard. The "config.xml" file from your job definition allows answers to those types of questions, without a long series of questions and answers.

          Mark Waite added a comment - Please upload the job configuration file for the specific job. Those messages seem to indicate that you have placed a wildcard in the "Branches to build" field but want the plugin to not build changes when they are detected on a branch matching the wildcard. The "config.xml" file from your job definition allows answers to those types of questions, without a long series of questions and answers.

          The variables (GIT_FORK_URL and GIT_FORK_BRANCH) inside the attached config xml file are supplied by build parameters and validated (weakly) by the validating-string-parameter-plugin against a regex pattern. They do not contain wildcards.

          Martin d'Anjou added a comment - The variables (GIT_FORK_URL and GIT_FORK_BRANCH) inside the attached config xml file are supplied by build parameters and validated (weakly) by the validating-string-parameter-plugin against a regex pattern. They do not contain wildcards.

          I should add that the console also prints the values of the GIT_FORK_URL and GIT_FORK_BRANCH variables:

          GIT_FORK_BRANCH=feature/PROJECT-102-feature-b
          GIT_BRANCH=fork/feature/PROJECT-102-feature-b
          GIT_FORK_URL=ssh://git@git.company.com/user/project-fork.git
          

          There is no wildcard in the values.

          Martin d'Anjou added a comment - I should add that the console also prints the values of the GIT_FORK_URL and GIT_FORK_BRANCH variables: GIT_FORK_BRANCH=feature/PROJECT-102-feature-b GIT_BRANCH=fork/feature/PROJECT-102-feature-b GIT_FORK_URL=ssh://git@git.company.com/user/project-fork.git There is no wildcard in the values.

          Adrian Moisey added a comment -

          I'm also having this issue.
          It would be nice to be able to make the git plugin stop doing that.

          Adrian Moisey added a comment - I'm also having this issue. It would be nice to be able to make the git plugin stop doing that.

          I think the problem comes from here : https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitSCM.java#L968
          The test should be : if job enabled and SCM polling activated then ....
          It doesn't make sense to trigger a polling if this one isn't activated, like in your case when the job is externally triggered and uses some parameters
          What do you think ndeloof ?

          Arnaud Héritier added a comment - I think the problem comes from here : https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitSCM.java#L968 The test should be : if job enabled and SCM polling activated then .... It doesn't make sense to trigger a polling if this one isn't activated, like in your case when the job is externally triggered and uses some parameters What do you think ndeloof ?

          Doing more tests on the plugin I understand that it is more a feature than a bug the fact to build all commits matching the branch regexp and and the Refspec

          The bug for me is more to enforce to triggering builds as SCM triggers. Instead it should call the same cause/triggering than the current one.
          When you have a job like here which is manually triggered with various parameters the new build should be call with exactly the same set of parameters.

          What do you think ?

          Arnaud Héritier added a comment - Doing more tests on the plugin I understand that it is more a feature than a bug the fact to build all commits matching the branch regexp and and the Refspec The bug for me is more to enforce to triggering builds as SCM triggers. Instead it should call the same cause/triggering than the current one. When you have a job like here which is manually triggered with various parameters the new build should be call with exactly the same set of parameters. What do you think ?

            Unassigned Unassigned
            deepchip Martin d'Anjou
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: