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

any job connected to specific bitbucket repository with "Bitbucket Server" updates last commit status

      Hi there,

      Please help me to understand whether described behavior relates to Bitbucket server integration plugin and if yes - is it a bug?

      Any job connected to specific bitbucket repository with "Bitbucket Server" updates repository last commit (although it is not related to that build) build status each time it runs.

          [JENKINS-69449] any job connected to specific bitbucket repository with "Bitbucket Server" updates last commit status

          White Fluffy created issue -

          hi whitefluffypenguin , can you please share more information like the build type you have used when you encountered the issue and the reproduction steps for this?

          Atlassian Bitbucket Server added a comment - hi whitefluffypenguin , can you please share more information like the build type you have used when you encountered the issue and the reproduction steps for this?
          White Fluffy made changes -

          White Fluffy added a comment - - edited

          Hi there, The impression is that any job connected to specific bitbucket repository with “Bitbucket Server” updates last commit (of mentioned repository) build status. Current testing job is the 'pipeline' one. Reproduction steps are the following: create pipeline job, configure 'Source Code Management' to use 'Bitbucket Server' and specific project and repository, save, launch the job, go to bitbucket commits page of configured repository, find a build notification under the rightest 'Builds' notification column. This build notification has no relation to mentioned commit. It is there just because this commit is the latest at the moment.

          White Fluffy added a comment - - edited Hi there, The impression is that any job connected to specific bitbucket repository with “Bitbucket Server” updates last commit (of mentioned repository) build status. Current testing job is the 'pipeline' one. Reproduction steps are the following: create pipeline job, configure 'Source Code Management' to use 'Bitbucket Server' and specific project and repository, save, launch the job, go to bitbucket commits page of configured repository, find a build notification under the rightest 'Builds' notification column. This build notification has no relation to mentioned commit. It is there just because this commit is the latest at the moment.
          White Fluffy made changes -
          Martin Henschke made changes -
          Attachment New: screenshot-1.png [ 59058 ]
          Martin Henschke made changes -
          Attachment New: commits-builds.png [ 59059 ]

          Hi White Fluffy,

          I've tried to follow your replication steps but I'm not really understanding the issue you're describing. Here are the steps I took:

          • Created a pipeline job, configure Pipeline from SCM and configured it with my job. Note I've kept the branch selector as */master, which is the branch that will be build when running the job:
          • Run the job. The commit at the head of master was ff7701abbd4, and visiting the builds page a build status was sent to that commit
          • I added two more commits to master 98067d84b22 and 37efe12f3da, and ran the job again. The latter commit was built and a build status was sent to that on bitbucket.
            The below screenshot shows both build statuses on the commits page:

          This is expected behaviour. When Jenkins kicks a build, the latest commit is picked up to build. Quoting from your question:

          > This build notification has no relation to mentioned commit. It is there just because this commit is the latest at the moment.

          Can you please elaborate on what you mean here? Your screenshot only shows the commit ID for the job, but you don't show the branch history for your build so I'm not really sure what I'm looking at.

          Martin Henschke added a comment - Hi White Fluffy, I've tried to follow your replication steps but I'm not really understanding the issue you're describing. Here are the steps I took: Created a pipeline job, configure Pipeline from SCM and configured it with my job. Note I've kept the branch selector as */master, which is the branch that will be build when running the job: Run the job. The commit at the head of master was ff7701abbd4, and visiting the builds page a build status was sent to that commit I added two more commits to master 98067d84b22 and 37efe12f3da, and ran the job again. The latter commit was built and a build status was sent to that on bitbucket. The below screenshot shows both build statuses on the commits page: This is expected behaviour. When Jenkins kicks a build, the latest commit is picked up to build. Quoting from your question: > This build notification has no relation to mentioned commit. It is there just because this commit is the latest at the moment. Can you please elaborate on what you mean here? Your screenshot only shows the commit ID for the job, but you don't show the branch history for your build so I'm not really sure what I'm looking at.

          White Fluffy added a comment -

          Hi Martin,
          A few interesting points about expected behavior have been raised - please help me to understand something.
          Suppose there is a repository that includes mixed sources (in our case the devops ones: various groovy, python, docker files) that support different functionality and are used by different jenkins jobs - can it happen?
          If one of these jobs is configured to check out repository sources - should we presume the latest commit of that repository certainly relates to the functionality implemented in this job (in my eyes not always)?
          You also asked about "branch history for your build" - we are using bitbucket feature branch workflow https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow
          however, assuming single master branch is safe enough to facilitate the discussion.

          White Fluffy added a comment - Hi Martin, A few interesting points about expected behavior have been raised - please help me to understand something. Suppose there is a repository that includes mixed sources (in our case the devops ones: various groovy, python, docker files) that support different functionality and are used by different jenkins jobs - can it happen? If one of these jobs is configured to check out repository sources - should we presume the latest commit of that repository certainly relates to the functionality implemented in this job (in my eyes not always)? You also asked about "branch history for your build" - we are using bitbucket feature branch workflow https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow ,  however, assuming single master branch is safe enough to facilitate the discussion.
          Naj made changes -
          Labels New: triaged

            Unassigned Unassigned
            whitefluffypenguin White Fluffy
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: