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

Jenkins job getting triggered for every commit made in the repo instead for commits to branch(master)

    XMLWordPrintable

Details

    Description

      Steps to replicate:

      1. Did setup - installing plugin, giving bitbucket instance details with a token in Jenkins --> Manage Jenkins --> Configure System --> Bitbucket Server integration
      2. Created a multi-configuration job and linked with bitbucket repo of master branch to get the code
      3. Create branch(Ex: dev_branch) from a master in the repo and commit any change to the dev_branch

      Actual:

      Job is getting triggered by taking master branch code

      Expected:

      The job should trigger only if there is any new commit to master. However, the job is running for commit made due to dev_branch.
      Running a job with master code even though there are no new changes is not worth it.

      If I select dev_branch in the Job then it should poll for new commits to that branch and trigger.

      Attachments

        Issue Links

          Activity

            karthikeya_raja Karthikeya Raja created issue -
            karthikeya_raja Karthikeya Raja made changes -
            Field Original Value New Value
            Description *Steps to replicate:*

             
             # Did setup - installing plugin, giving bitbucket instance details with a token in Jenkins --> Manage Jenkins --> Configure System --> Bitbucket Server integration
             # Created a multi-configuration job and linked with bitbucket repo of master branch to get the code
             # Create branch(Ex: dev_branch) from a master in the repo and commit any change to the dev_branch

             

            *Actual:*

            Job is getting triggered by taking master branch code

             

            *Expected:*

            The job should trigger only if there is any new commit to master. However, the job is running for commit made due to dev_branch.
            Running a job with master code even though there are no new changes is not worth it.

            If I select dev_branch in the Job then it should poll for new commits to that branch and trigger.
            *Steps to replicate:*
             # Did setup - installing plugin, giving bitbucket instance details with a token in Jenkins --> Manage Jenkins --> Configure System --> Bitbucket Server integration
             # Created a multi-configuration job and linked with bitbucket repo of master branch to get the code
             # Create branch(Ex: dev_branch) from a master in the repo and commit any change to the dev_branch

            *Actual:*

            Job is getting triggered by taking master branch code

            *Expected:*

            The job should trigger only if there is any new commit to master. However, the job is running for commit made due to dev_branch.
             Running a job with master code even though there are no new changes is not worth it.

            If I select dev_branch in the Job then it should poll for new commits to that branch and trigger.
            mhenschke_atlassian Martin Henschke made changes -
            Assignee Kristy Hughes [ khughes ]
            xpyrus Robert Seidel made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            nkagaoan Naj made changes -
            Labels triaged
            mhenschke_atlassian Martin Henschke made changes -
            Link This issue is related to JENKINS-62668 [ JENKINS-62668 ]
            nkagaoan Naj made changes -
            Labels triaged tracked-by-atlassian triaged
            atlassian_bbs Atlassian Bitbucket Server made changes -
            Labels tracked-by-atlassian triaged tracked-by-atlassian
            atlassian_bbs Atlassian Bitbucket Server made changes -
            Resolution Cannot Reproduce [ 5 ]
            Status Open [ 1 ] Closed [ 6 ]

            People

              Unassigned Unassigned
              karthikeya_raja Karthikeya Raja
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: