package org.jenkinsci.plugins.p4.publish; import hudson.Extension; import org.jenkinsci.Symbol; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.DataBoundSetter; import java.io.Serializable; public class SubmitImpl extends Publish implements Serializable { private static final long serialVersionUID = 1L; private final boolean reopen; private final String purge; public boolean isReopen() { return reopen; } public String getPurge() { return purge; } public int getPurgeValue() { int keep = 0; if (purge != null && !purge.isEmpty()) { try { keep = Integer.parseInt(purge); } catch (NumberFormatException e) { // ignore and return 0 } } // Upper limit if (keep > 512) { return 512; } // only values 1-10,16,32,64,128,256,512 if (keep > 10) { for (int i = 4; i < 10; i++) { int base = (int)Math.pow(2, i); if (base > keep) { return base; } } } return keep; } @DataBoundConstructor public SubmitImpl(String description, boolean onlyOnSuccess, boolean delete, boolean modtime, boolean reopen, String purge) { super(description, onlyOnSuccess, delete, modtime); this.reopen = reopen; this.purge = purge; } @DataBoundSetter public void setPaths(String paths) { super.setPaths(paths); } @Extension @Symbol("submit") public static final class DescriptorImpl extends PublishDescriptor { @Override public String getDisplayName() { return "Submit change"; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#8 | 26094 | Paul Allen |
Merge pull request #105 from jenkinsci/publishFilter Publish path filter for reconcile JENKINS-56501 |
||
#7 | 25668 | Paul Allen |
Merge pull request #94 from lystor/bug-56414 JENKINS-56414: Support of Reconcile with Modtime in P4Publish |
||
#6 | 22684 | Paul Allen | Added @Symbol to Extension classes for Pipeline Syntax. | ||
#5 | 20954 | Paul Allen |
Add purge -S<n> option for the Submit stage of Publish. If a value is provided it will set the purge option on all files found as part of the reconcile (ADD/EDIT). It will not remove the purge option once set. JENKINS-36112 |
||
#4 | 19790 | Paul Allen |
Add a propagate delete option to Publish. Originally only add/edits were permitted to prevent users deleting files with incorrect View maps, but this option allows deletes if enabled. JENKINS-27885 |
||
#3 | 14035 | Paul Allen |
Publish on Success option. Added a checkbox to the Publish step to only shelve/submit change if the build succeeded. |
||
#2 | 11334 | Paul Allen |
Remote slave support for Publish Perforce Publish commands need to be executed from the remote slave. - Includes refactoring into task package |
||
#1 | 11231 | Paul Allen |
Publish assets to Perforce. New feature to allow Jenkins to shelve or submit the build result to Perforce. Configured as a Post Build Step, the Perforce credential and workspace are required as the asset could be published to a different Perforce instance. |