public abstract class CargoContainerAdapter extends ContainerAdapter implements Serializable
To support remote operations as an inner class, marking the class as serializable.
Modifier and Type | Class and Description |
---|---|
static class |
CargoContainerAdapter.DeployCallable |
Constructor and Description |
---|
CargoContainerAdapter() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
configure(org.codehaus.cargo.container.configuration.Configuration config,
hudson.EnvVars envVars,
hudson.util.VariableResolver<String> resolver)
Fills in the
Configuration object. |
protected org.codehaus.cargo.container.deployable.EAR |
createEAR(File deployableFile)
Creates a Deployable object EAR from the given file object.
|
protected org.codehaus.cargo.container.deployable.WAR |
createWAR(File deployableFile)
Creates a Deployable object WAR from the given file object.
|
protected void |
deploy(org.codehaus.cargo.generic.deployer.DeployerFactory deployerFactory,
hudson.model.TaskListener listener,
org.codehaus.cargo.container.Container container,
File f,
String contextPath) |
protected String |
expandVariable(hudson.EnvVars envVars,
hudson.util.VariableResolver<String> resolver,
String variable)
Expands an encoded environment variable.
|
protected org.codehaus.cargo.container.Container |
getContainer(org.codehaus.cargo.generic.configuration.ConfigurationFactory configFactory,
org.codehaus.cargo.generic.ContainerFactory containerFactory,
String id,
hudson.EnvVars envVars,
hudson.util.VariableResolver<String> resolver) |
protected abstract String |
getContainerId()
Returns the container ID used by Cargo.
|
void |
redeployFile(hudson.FilePath war,
String contextPath,
hudson.model.Run<?,?> run,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
Perform redeployment.
|
all, getDescriptor, redeploy
protected abstract String getContainerId()
protected abstract void configure(org.codehaus.cargo.container.configuration.Configuration config, hudson.EnvVars envVars, hudson.util.VariableResolver<String> resolver)
Configuration
object.config
- the configuration of the adapterenvVars
- the environmental variables of the buildresolver
- the variable resolverprotected org.codehaus.cargo.container.Container getContainer(org.codehaus.cargo.generic.configuration.ConfigurationFactory configFactory, org.codehaus.cargo.generic.ContainerFactory containerFactory, String id, hudson.EnvVars envVars, hudson.util.VariableResolver<String> resolver)
protected void deploy(org.codehaus.cargo.generic.deployer.DeployerFactory deployerFactory, hudson.model.TaskListener listener, org.codehaus.cargo.container.Container container, File f, String contextPath)
protected org.codehaus.cargo.container.deployable.WAR createWAR(File deployableFile)
deployableFile
- The deployable file to create the Deployable from.protected String expandVariable(hudson.EnvVars envVars, hudson.util.VariableResolver<String> resolver, String variable)
envVars
- the environment variables of the buildresolver
- unusedvariable
- the variable to expandprotected org.codehaus.cargo.container.deployable.EAR createEAR(File deployableFile)
deployableFile
- The deployable file to create the Deployable from.public void redeployFile(hudson.FilePath war, String contextPath, hudson.model.Run<?,?> run, hudson.Launcher launcher, hudson.model.TaskListener listener) throws IOException, InterruptedException
ContainerAdapter.redeploy(FilePath, String, AbstractBuild, Launcher, BuildListener)
delegate to that implementation to be usable within Pipeline projectsredeployFile
in class ContainerAdapter
war
- the path of the war/ear file to deploycontextPath
- the context path for the war to be deployedrun
- the build that is being deployedlauncher
- the launcher of the buildlistener
- the BuildListener of the build to deployIOException
- if there is an error locating the war fileInterruptedException
- if there is an error deploying to the serverCopyright © 2016–2020. All rights reserved.