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

Wrong Commit ID in Pull Request Builds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins Version 2.235.1
      multibranch-pipeline
      bitbucket-branch-source-plugin
      git-plugin

      We are using a multibranch pipeline set up to get the pipeline from a Jenkinfile within the repository.

      The current configuration is:
      Discover branches: Exclude branches that are also filled as PRs
      Discover pull requests from origin: Merging the pull request with the current target branch revision
      Filter by name: .master|.*release/.|.PR-. (here if I don't include the pr part no prs are built)
      Clean before checkout
      Sparse Checkout (with about 6 different paths)
      Property Strategy All branches get the same properties

      Currently on PR Builds the env variable for the commit id, and previous commit id for that matter, are not valid commits in the Bitbucket repository.
      The commit id that shows on the blue ocean page is correct, the short version of commit iv, but it is in fact the last commit on source branch.

      Is this an expected behavior?

      As a side note PR changes are not reported on the first build (should this changeset include de diff between source branch and target branch)?

            Unassigned Unassigned
            one_random_dev Random Dev
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: