Status: Open (View Workflow)
We trigger changes on pushes to feature branches, and want to perform a local merge with master before building (in order to ensure that master will build when the feature is later merged).
The "Merge before build" option on the git plugin handles this nicely, but it unfortunately leaves the workspace on a different changeset (if a fast-forward wasn't possible), as it operates by first checking out master and then merging in the feature branch.
As a result, the Bitbucket Build Status Notifier plugin sometimes reports success/failure for a nonexistent changeset. We want to report status for the commit on the feature branch that triggered the build (not the throwaway local changeset resulting from merge).
We can add a prebuild step to execute the git commands manually (eg. by merging master into feature with --no-commit), but then we have to manually deal with things like updating git LFS (since master may have new git lfs files)
Has anyone else found a more graceful solution to this issue?
Seems related to this issue: JENKINS-21536
- is related to
JENKINS-21536 GIT_BRANCH should not change after merge