Class DeploymentHelper

java.lang.Object
com.xebialabs.deployit.maven.helper.DeploymentHelper

public class DeploymentHelper extends Object
  • Field Details

  • Constructor Details

    • DeploymentHelper

      public DeploymentHelper(DeploymentLogger log, com.xebialabs.deployit.booter.remote.DeployitCommunicator communicator)
  • Method Details

    • 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.DeploymentValidationError
      Checks if deployment valid (does not contain ERROR level validation messages). WARNING and INFO level messages are logged but do not block the deployment.
      Throws:
      DeploymentHelper.DeploymentValidationError
    • 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
      Throws:
      DeploymentHelper.EnvironmentAlreadyExistsError
    • 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.