perform
public boolean perform(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Here we should do upmerging.
So:
- Fetch case info using CASE_ID parameter (should be given).
- NOT !! Create 'ReleaseBranch' object from case info and a nextBranch object which is releasebranch.copy().next();
- Create ReleaseBranch object from current branch, we may expect that the GatekeeperPlugin set the correct one.
- Initiate UpMerge sequence....
- Try to pull new code from nextBranch.getNext();
- Try to merge this new code with releaseBranch();
- Commit this shiny new code.
- Set a flag somewhere, indicating that this upmerge has been done.
- Repeat UpMerge sequence for next releases until there are no moar releases.
- In some post-build thingy, push these new branches if all went well.
- We SHOULD not have to do any cleanup actions, because workspace is updated every build.
- Rely on the FogbugzPlugin (dependency, see pom.xml) to do reporting of our upmerges.
- Trigger new builds on all branches that have been merged.
- Specified by:
perform
in interface hudson.tasks.BuildStep
- Overrides:
perform
in class hudson.tasks.BuildStepCompatibilityLayer