package org.jenkinsci.plugins.p4_client.review; import hudson.model.Action; import hudson.model.AbstractProject; import hudson.model.Hudson; import java.io.IOException; import java.util.logging.Logger; import javax.servlet.ServletException; import org.kohsuke.stapler.HttpRedirect; import org.kohsuke.stapler.HttpResponse; public class ReviewAction implements Action { private final ReviewProperty property; private final AbstractProject<?, ?> project; public ReviewAction(AbstractProject<?, ?> project, ReviewProperty property) { this.project = project; this.property = property; } public String getIconFileName() { if (property.getUrl() == null) { return null; } return "clock.png"; // return "/plugin/p4_client/icons/p4.png"; } public String getDisplayName() { if (property.getUrl() == null) { return null; } return "Build Review"; } public String getUrlName() { if (property.getUrl() == null) { return null; } return "review"; } public void doBuild() throws IOException, ServletException { project.getACL().checkPermission(AbstractProject.BUILD); if (property.getUrl() == null) { LOGGER.info("doReview"); // Hudson.getInstance().getQueue().schedule( new ShelveProjectTask( // project ), 0 ); } //return new HttpRedirect(Hudson.getInstance().getU); } public AbstractProject<?, ?> getProject() { return project; } final static Logger LOGGER = Logger.getLogger(ReviewAction.class.getName()); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#9 | 9672 | Paul Allen | Refactor name from 'p4_client' to 'p4'. | ||
#8 | 9055 | Paul Allen |
Label support. Build at a label using the pram 'label'. This includes adding the label to the ChangeEntry, building the change reports and Browser links to Swarm. (TPI-102) |
||
#7 | 8971 | Paul Allen |
Attempt to fix rootUrl bug, but ended up tidying code. Turns out that you MUST set the Jenkins URL and click Save; even though the box has a default value it is not applied unless the configuration page is Applied/Saved. Manage Jenkins --> Configuration --> Jenkins Location: Jenkins URL |
||
#6 | 8923 | Paul Allen | Remove unused parameters 'project' and 'branch' that might be the cause of TPI-81. | ||
#5 | 8737 | Paul Allen |
Added basic Help for SCM Configuration page. Tidy up descriptions and fix (null:null) in Credential summary. |
||
#4 | 8729 | Paul Allen |
Changed Build Review to Transient Action (so no check box required). - Added Perforce Icon to Build Review Action. |
||
#3 | 8693 | Paul Allen | Added manual launch Review page - POST from Jenkins. | ||
#2 | 8688 | Paul Allen | (Work in progress) Able to call build from review Action and pass URL params. | ||
#1 | 8683 | Paul Allen | Simple Action plugin hooks for building reviews in a Jenkins Job. |