|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
- [JIRA] (JENKINS-1682) Pre-tested commit feature k...@kohsuke.org (JIRA)
- [JIRA] (JENKINS-1682) Pre-tested commit featu... l...@praqma.net (JIRA)
Hmmm!
I agree that the implementation of the support for pre-tested commit will have to be laid on each individual plugin. The point that I was advocating in Paris was, that there ought to be a recommended approach that the SCM plugin developers should/could use when implementing it.
Our rationale is that all pre-test commits - regardless of the underlying VCS - has a generic character:
Pre-build step
(The pre-build step is where the SCM extension currently has it's foot print)
The build step
If the merge succeeded the job continues to the build step - the user simply implement the test that should qualify the commit - typically something relatively simple like build and run the unit test - but the actual test is of course up to the user of the plugin to decide.
The post-build step
The pre-tested commit feature will have to have a foot print in the post-build step to decide if the current state of the workspace is accepted as a new commit - or not)
Suggested solution
Currently the "generic" approach is implemented by having the SCM plugins that supports that pre-tested commit feature extend both SCM and the Notifier (to get a foot print in the post build step).
We suggest that the the SCM extension simply is enhanced so that it has a wrap-up method that is called in the post-build step - those SCM plugins that want to make decisions regarding the workspace could implement and override the wrap-up method - those who doesn't could simply do nothing - and everything would stay the same.
This approach would be backwards compatible and those SCM plugins that want to implement support for pre-tested commits wouldn't have to use the, not so obvious and kind of tedious, approach to have their SCM plugin extend the Notifier as well.
Lars Kruse