Class DeploymentHelper
- java.lang.Object
-
- com.xebialabs.deployit.maven.helper.DeploymentHelper
-
public class DeploymentHelper extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeploymentHelper.DeploymentValidationErrorstatic classDeploymentHelper.EnvironmentAlreadyExistsError
-
Field Summary
Fields Modifier and Type Field Description static intTASK_WAIT_TIMEOUT_MS
-
Constructor Summary
Constructors Constructor Description DeploymentHelper(DeploymentLogger log, com.xebialabs.deployit.booter.remote.DeployitCommunicator communicator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.xebialabs.deployit.engine.api.dto.DeploymentattachExplicitDeployeds(com.xebialabs.deployit.engine.api.dto.Deployment deployment, List<MavenDeployed> explicits)Attaches explicitly specified deployeds to the deploymentcom.xebialabs.deployit.plugin.api.udm.ConfigurationItemcreateEnvironment(String id, List<? extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> members)Creates an environment with memberscom.xebialabs.deployit.engine.api.execution.TaskExecutionStateexecuteAndArchiveTask(String taskId)Starts task, waits until it's done.booleanisApplicationDeployed(String source, String target)Checks whether application from given source is deployed to given targetvoidlogEnvironment(com.xebialabs.deployit.plugin.api.udm.ConfigurationItem envCi)logs environment and it's membersvoidlogStepState(String taskId, int stepNumber)Logs information about single stepvoidlogTaskState(String taskId)Logs information about task and all stepscom.xebialabs.deployit.plugin.api.udm.ConfigurationItemreadCiOrNull(String environmentId)Returns configuration item from repository, or null if it does not existvoidskipAllSteps(String taskId)com.xebialabs.deployit.plugin.api.udm.ConfigurationItemuploadPackage(File darFile)Uploads and imports a .dar package to deployit.com.xebialabs.deployit.engine.api.dto.DeploymentvalidateDeployment(com.xebialabs.deployit.engine.api.dto.Deployment deployment)Checks if deployment valid (does not contain validation messages)
-
-
-
Field Detail
-
TASK_WAIT_TIMEOUT_MS
public static final int TASK_WAIT_TIMEOUT_MS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DeploymentHelper
public DeploymentHelper(DeploymentLogger log, com.xebialabs.deployit.booter.remote.DeployitCommunicator communicator)
-
-
Method Detail
-
isApplicationDeployed
public boolean isApplicationDeployed(String source, String target)
Checks whether application from given source is deployed to given target
-
attachExplicitDeployeds
public com.xebialabs.deployit.engine.api.dto.Deployment attachExplicitDeployeds(com.xebialabs.deployit.engine.api.dto.Deployment deployment, List<MavenDeployed> explicits)Attaches explicitly specified deployeds to the deployment
-
skipAllSteps
public void skipAllSteps(String taskId)
-
executeAndArchiveTask
public com.xebialabs.deployit.engine.api.execution.TaskExecutionState executeAndArchiveTask(String taskId)
Starts task, waits until it's done. Returns one of the states: {DONE, EXECUTED, STOPPED, CANCELLED}.
-
logTaskState
public void logTaskState(String taskId)
Logs information about task and all steps
-
logStepState
public void logStepState(String taskId, int stepNumber)
Logs information about single step
-
validateDeployment
public com.xebialabs.deployit.engine.api.dto.Deployment validateDeployment(com.xebialabs.deployit.engine.api.dto.Deployment deployment) throws DeploymentHelper.DeploymentValidationErrorChecks if deployment valid (does not contain validation messages)
-
readCiOrNull
public com.xebialabs.deployit.plugin.api.udm.ConfigurationItem readCiOrNull(String environmentId)
Returns configuration item from repository, or null if it does not exist
-
logEnvironment
public void logEnvironment(com.xebialabs.deployit.plugin.api.udm.ConfigurationItem envCi)
logs environment and it's members
-
createEnvironment
public com.xebialabs.deployit.plugin.api.udm.ConfigurationItem createEnvironment(String id, List<? extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> members) throws DeploymentHelper.EnvironmentAlreadyExistsError
Creates an environment with members
-
uploadPackage
public com.xebialabs.deployit.plugin.api.udm.ConfigurationItem uploadPackage(File darFile)
Uploads and imports a .dar package to deployit. A replacement for PackageService.upload() Check DEPLOYITPB-3999 and DEPLOYITPB-4012 for more details.
-
-