package org.jenkinsci.plugins.p4.workspace; import com.perforce.p4java.client.IClient; import com.perforce.p4java.client.IClientSummary.IClientOptions; import com.perforce.p4java.impl.mapbased.client.Client; import com.perforce.p4java.server.IOptionsServer; import hudson.Extension; import org.jenkinsci.Symbol; import org.kohsuke.stapler.DataBoundConstructor; import java.io.Serializable; import java.util.logging.Logger; public class StreamWorkspaceImpl extends Workspace implements Serializable { private static final long serialVersionUID = 1L; private final String streamName; private String format; private static Logger logger = Logger.getLogger(StreamWorkspaceImpl.class .getName()); public String getStreamName() { return streamName; } public String getFormat() { return format; } @Override public String getName() { return format; } @Override public void setName(String name) { this.format = name; } @Override public WorkspaceType getType() { return WorkspaceType.STREAM; } @DataBoundConstructor public StreamWorkspaceImpl(String charset, boolean pinHost, String streamName, String format) { super(charset, pinHost); this.streamName = streamName; this.format = format; } @Override public IClient setClient(IOptionsServer connection, String user) throws Exception { // expands Workspace name if formatters are used. String clientName = getFullName(); IClient iclient = connection.getClient(clientName); if (iclient == null) { logger.info("P4: Creating stream client: " + clientName); Client implClient = new Client(connection); implClient.setName(clientName); implClient.setOwnerName(user); connection.createClient(implClient); iclient = connection.getClient(clientName); } // Owner set for use with p4maven iclient.setOwnerName(user); // Expand Stream name String streamFullName = getExpand().format(getStreamName(), false); iclient.setStream(streamFullName); // Set clobber on to ensure workspace is always good IClientOptions options = iclient.getOptions(); options.setClobber(true); iclient.setOptions(options); return iclient; } @Extension @Symbol("streamSpec") public static final class DescriptorImpl extends WorkspaceDescriptor { @Override public String getDisplayName() { return "Streams (view generated by Perforce for each node)"; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 23685 | Paul Allen | Copy main -> dev | ||
#1 | 20641 | Paul Allen | Copy main -> dev (jenkinsci/p4-plugin) | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/workspace/StreamWorkspaceImpl.java | |||||
#12 | 20308 | Paul Allen |
P4Groovy (experimental) Get a P4 object in groovy. Supporting basic functions: ’run’ (to run perforce commands), ‘fetch’ and ‘save’ (to access Perforce specs). |
||
#11 | 16628 | Paul Allen |
Set the Client Owner field on update as well as creation. (support for p4maven) |
||
#10 | 16625 | Paul Allen | Set the Workspace Owner at creation (not on update). | ||
#9 | 15394 | Paul Allen |
Workflow-DSL functionality. Tested workflow DSL against 1.596.1 older functionality tested against 1.580.1 @sven_erik_knop |
||
#8 | 15379 | Paul Allen |
Ground-work for Workflow-DSL (Split out Sven’s DSL changes to the core) @sven_erik_knop |
||
#7 | 13681 | Paul Allen |
Abstracted Expand class from Workspace. Added support for Label variable expansion in the name and description. |
||
#6 | 11472 | Paul Allen |
Pin the Workspace to the build host. Added a check box under the Workspace configuration to allow Jenkins to Pin the workspace, by setting the Host field. The hostname is resolved from the Computer object or InetAddress. |
||
#5 | 11461 | Paul Allen | Expand Jenkins variables for Streams paths. | ||
#4 | 10854 | Paul Allen |
Clone Workspace Object Seems Jenkins makes re-entrant calls to the PerforceScm Object and caused the Workspace Object to get trampled. JENKINS-25547 |
||
#3 | 9769 | Paul Allen | Copying using p4-jenkins | ||
#2 | 9738 | Paul Allen | Merging using p4-jenkins | ||
#1 | 9690 | Paul Allen |
[Branching using p4-jenkins] Release 1.0.1 |
||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/main/java/org/jenkinsci/plugins/p4/workspace/StreamWorkspaceImpl.java | |||||
#1 | 9672 | Paul Allen | Refactor name from 'p4_client' to 'p4'. | ||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/main/java/org/jenkinsci/plugins/p4_client/workspace/StreamWorkspaceImpl.java | |||||
#13 | 9495 | Paul Allen |
Fix Polling issue; using the wrong client. Removed static classes and internal referenced to PerforceScm attributes, to avoid threading issues. |
||
#12 | 9040 | Paul Allen | Sets the workspace 'Owner' field when generating a workspace for Template/Stream modes. | ||
#11 | 9038 | Paul Allen |
Improved error messages for Form Validate field checks. Uses Perforce Server messages (TPI-80) |
||
#10 | 8929 | Paul Allen |
Clean up doCheck Warnings on configuration page (TPI-80). - Added check exceptions to log as warnings. |
||
#9 | 8902 | Paul Allen |
Updated test cases: Pushed Workspace 'charset' to abstract Workspace class. Minor bugfixes in Workspace AutoCompletionCandidates method. |
||
#8 | 8899 | Paul Allen | Move Workspace setup/creation code to Implementation class. | ||
#7 | 8896 | Paul Allen | Moved common method 'doFillCharsetItems' into abstract class 'WorkspaceDescriptor'. | ||
#6 | 8771 | Paul Allen |
Perforce Server 12.1 min check for: Build configuration and password/ticket credentials. Includes: - Added logging for Perforce connections (fine) and set connection pool to 2. - Add 'none' to empty charset list (connection bug?) - Supress P4Java errors for syncing ubinary, xtext, unicode |
||
#5 | 8769 | Paul Allen | Update to charset option for workspaces to use a drop-down select with a default of 'none'. | ||
#4 | 8738 | Paul Allen |
Workspace Name Formatter. For Template and Stream workspaces it allows the substitution of the following tags: ${node} The name given to the slave Jenkins node. ${hostname} The hostname for the slave Jenkins node. ${project} The name of the Jenkins build Job. ${hash} Unique hash code of the Jenkins node. |
||
#3 | 8663 | Paul Allen | Rollout of charset for all Workspace modes. | ||
#2 | 8662 | Paul Allen | Added auto fill and checks for streams and templates. | ||
#1 | 8641 | Paul Allen | Added workspace helper (setClient) and template/stream types. |