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)?