Hi
We are trying to implement workflow in Stash using pull-requests reviews. And also connect this with our Jenkins CI...
But we encountered couple of troubles due to that and all exisiting solutions seems doesn't help
What we want to acomplish is described in those steps:
1. Create Branch from JIRA link in the stash
2. Pull created branch locally and start working on it
3. Commit changes to remote branch
4. Open Pull Request in Stash with changed branch
5. After Pull Request is openned trigger "Pull Request Build Job" in Jenkins
(There was some mentioning about that like here , and we solved this using Git Plugin in Jenkins and specifying refspec parameters: "+refs/pull-requests/*:refs/remotes/origin/pull-requests/*" and building the "origin/pull-requests/*/from" branch)
Also we are using Jenkins WebHook plugin to trigger job by commit to Stash repo
6. Initiate Review process with changes disscussion
7. (important) Do commit changes and update pull-request with new commits due to disscussion
8. (important) Trigger Jenkins build for new commits in the "Pull Request Build Job"
9. Review again, approve, merge
And in point 8 comes the trouble, cause stash updates the reference - "refs/pull-requests/*/from" only if it was Approved, the same with "refs/pull-requests/*/merge" when it's merged....And by commit, "Jenkins WebHook Plugin" is triggered but poll scm at jenkins side is doing nothing cause nothing updated in the remote refs... We tried also to force refs update, but got - "Stash manages these refs automatically, and they may not be updated by users.". And it makes a real pain in the process and make not much sense to use "Pull Requests" cause developer can't check his commit (if it's build successfully) after he updated pull request with disscussed changes, so to show reviewers that it passes, but he needs to wait approve and than again initiate unaprove, which already strange...
There is ofcourse option to specify branch pattern without using refspecs, but it could trigger not needed jobs and would trigger some of them before pull request was made - which is totally what we don't need...
Is there any workaround or a way to update Stash pull-requests refspecs or add additional which will be up to date with pull-request initiate branch ??
I think in github they have for this purpose "refs/pull/*/head"