package org.jenkinsci.plugins.p4.groovy; import hudson.FilePath.FileCallable; import hudson.model.TaskListener; import hudson.remoting.VirtualChannel; import jenkins.security.Roles; import org.jenkinsci.plugins.p4.workspace.Workspace; import org.jenkinsci.remoting.RoleChecker; import org.jenkinsci.remoting.RoleSensitive; import java.io.File; import java.io.IOException; import java.io.Serializable; public class GetP4Task implements FileCallable<P4Groovy>, Serializable { private static final long serialVersionUID = 1L; private final String credential; private final Workspace workspace; private final TaskListener listener; public GetP4Task(String credential, Workspace workspace, TaskListener listener) { this.credential = credential; this.workspace = workspace; this.listener = listener; } @Override public P4Groovy invoke(File buildWorkspace, VirtualChannel channel) throws IOException, InterruptedException { P4Groovy p4Groovy = new P4Groovy(credential, listener, workspace); return p4Groovy; } @Override public void checkRoles(RoleChecker checker) throws SecurityException { checker.check((RoleSensitive) this, Roles.SLAVE); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 26097 | Paul Allen | Mark internal constructors protected. | ||
#4 | 26096 | Paul Allen |
Merge pull request #108 from joel-f-brown/master Credentials handling for Folders when using P4Groovy. Use run to determine the credentials in GetP4Task, then pass the P4BaseCredentials instead of the credentials ID. Now the P4Groovy getConnection() method uses the P4BaseCredentials instead of looking up the credentials from the active Jenkins instance. JENKINS-58745 JENKINS-57314 |
||
#3 | 21821 | Paul Allen |
Merge pull request #40 from s-sutherland/slaveexec P4Groovy execution to run on the slave |
||
#2 | 20418 | Paul Allen | Replace FileCallable and checkRoles with MasterToSlaveCallable. | ||
#1 | 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). |