Interface DeploymentService
@Path("/deployment")
@Consumes({"application/xml","application/json"})
@Produces({"application/xml","application/json"})
public interface DeploymentService
Deployment management
-
Method Summary
Modifier and TypeMethodDescriptioncreateTask
(Deployment deployment) Creates the deployment task.effectiveDictionary
(String environment, String applicationVersion, String application, String container) Get the effective dictionary for an environment, optionally filtered by application and container.generateSelectedDeployeds
(SelectedDeployment selectedDeployment) Generates only the deployeds for the given deployables in the deployment.generateSelectedDeployeds
(List<String> deployableIds, Deployment deployment) Deprecated.generateSingleDeployed
(String deployableId, String containerId, com.xebialabs.deployit.plugin.api.reflect.Type deployedType, Deployment deployment) Generates a deployed for the given deployable to the given container in the deployment.boolean
isDeployed
(String applicationId, String environmentId) Returns whether or not audm.Version
of theudm.Application
that is passed in is already deployed to theudm.Environment
.prepareAutoDeployeds
(Deployment deployment) Prepares all the deployeds for the given deployment.prepareInitial
(String versionId, String environmentId) Prepares an initial deployment.prepareUndeploy
(String deployedApplicationId) Prepares an undeployment.prepareUpdate
(String versionId, String deployedApplicationId) Prepares an update deployment.Rollback aSTOPPED
orEXECUTED
task.taskPreviewBlock
(Deployment deployment) Calculate the plan that XL Deploy will execute for the given deployment.taskPreviewBlock
(Deployment deployment, String blockId, int stepNr) Get details on a step in a step block.validate
(Deployment deployment) Validates the generated deployment.
-
Method Details
-
isDeployed
@GET @Path("exists") boolean isDeployed(@QueryParam("application") String applicationId, @QueryParam("environment") String environmentId) Returns whether or not audm.Version
of theudm.Application
that is passed in is already deployed to theudm.Environment
.- Parameters:
applicationId
- The ID of theudm.Application
.environmentId
- The ID of theudm.Environment
.- Returns:
true
if there exists a deployed version of the application on the environment,false
otherwise.
-
prepareInitial
@GET @Path("prepare/initial") Deployment prepareInitial(@QueryParam("version") String versionId, @QueryParam("environment") String environmentId) Prepares an initial deployment.- Parameters:
versionId
- The ID of theudm.Version
that is the source of the deployment.environmentId
- The ID of theudm.Environment
that is the target of the deployment.- Returns:
- A new
Deployment
object to which you can add deployeds. - Permission:
- deploy#initial
-
prepareUpdate
@GET @Path("prepare/update") Deployment prepareUpdate(@QueryParam("version") String versionId, @QueryParam("deployedApplication") String deployedApplicationId) Prepares an update deployment.- Parameters:
versionId
- The ID of the newudm.Version
that is the source of the deployment.deployedApplicationId
- The ID of theudm.DeployedApplication
that is to be updated.- Returns:
- A new
Deployment
object which contains the updated deployeds. - Permission:
- deploy#upgrade
-
prepareUndeploy
@GET @Path("prepare/undeploy") Deployment prepareUndeploy(@QueryParam("deployedApplication") String deployedApplicationId) Prepares an undeployment.- Parameters:
deployedApplicationId
- The ID of theudm.DeployedApplication
that is to be undeployed.- Returns:
- A new
Deployment
object which contains no deployeds (ie. all deployeds of the previous deployment will be deleted). - Permission:
- deploy#undeploy
-
prepareAutoDeployeds
Prepares all the deployeds for the given deployment. This will keep any previous deployeds present in the deployment object that are already present, unless they cannot be deployed with regards to their tags. It will add all the deployeds that are still missing. Also filters out the deployeds that do not have any source attached anymore (deployables that were previously present).- Parameters:
deployment
- The prepared Deployment parameter object- Returns:
- An updated Deployment parameter object.
- Permission:
- deploy#initial
-
generateSelectedDeployeds
@POST @Path("generate/selected") @Deprecated Deployment generateSelectedDeployeds(@QueryParam("deployables") List<String> deployableIds, Deployment deployment) Generates only the deployeds for the given deployables in the deployment. Try to generate deployeds from each of the deployables to all the matchingContainers
in theEnvironment
of the Deployment parameter object.- Parameters:
deployableIds
- The list of IDs of deployables to generate the deployeds for.deployment
- The prepared Deployment parameter object- Returns:
- An updated Deployment parameter object.
- Permission:
- deploy#initial
-
generateSelectedDeployeds
@POST @Path("generate/selected/deployables") Deployment generateSelectedDeployeds(SelectedDeployment selectedDeployment) Generates only the deployeds for the given deployables in the deployment. Try to generate deployeds from each of the deployables to all the matchingContainers
in theEnvironment
of the Deployment parameter object. This request is same as /deployment/generate/selected but does not use URL query parameters avoiding it becoming too long.- Parameters:
selectedDeployment
- The prepared Deployment parameter object with list of IDs of deployables to generate the deployeds for.- Returns:
- An updated Deployment parameter object.
- Permission:
- deploy#initial
-
generateSingleDeployed
@POST @Path("generate/single") Deployment generateSingleDeployed(@QueryParam("deployable") String deployableId, @QueryParam("container") String containerId, @QueryParam("deployedtype") com.xebialabs.deployit.plugin.api.reflect.Type deployedType, Deployment deployment) Generates a deployed for the given deployable to the given container in the deployment. The deployed should be of the given type (which is optional)- Parameters:
deployableId
- The ID of the deployable to generate a deployed forcontainerId
- The ID of the container to generate a deployed todeployedType
- (Optional) The type of the deployed to generatedeployment
- The prepared Deployment parameter object- Returns:
- An updated Deployment parameter object.
- Permission:
- deploy#initial
-
validate
Validates the generated deployment.Checks whether all the deployeds that are in the deployment are valid.
- Parameters:
deployment
- The deployment to validate.- Returns:
- The validated deployment.
-
taskPreviewBlock
Calculate the plan that XL Deploy will execute for the given deployment. A plan consists of one or more nested blocks. Blocks can be sequential, parallel, or a block containing steps. Note: The block returned is not a task yet, and as such can not be skipped or re-ordered.- Parameters:
deployment
- The deployment to generate the block for.- Returns:
- The block.
- Permission:
- deploy#initial for initial deployments, deploy#upgrade for upgrades, deploy#remove for undeployments
-
taskPreviewBlock
@POST @Path("previewblock/{blockId}/{stepNr}") StepState taskPreviewBlock(Deployment deployment, @PathParam("blockId") String blockId, @PathParam("stepNr") int stepNr) Get details on a step in a step block.- Parameters:
deployment
- The deployment to generate the block for.blockId
- The id of the step block to query the steps for.stepNr
- The number of the step to retrieve.- Returns:
- The step.
- Permission:
- deploy#initial for initial deployments, deploy#upgrade for upgrades, deploy#remove for undeployments, task#preview_step to see all details about a step
-
createTask
Creates the deployment task.- Parameters:
deployment
- The fully prepared Deployment parameter object.- Returns:
- a reference to a Task ID that can be executed by the
TaskService
. - Permission:
- deploy#initial for initial deployments, deploy#upgrade for upgrades, deploy#remove for undeployments
-
rollback
Rollback aSTOPPED
orEXECUTED
task. Reverting the deployment to the previous state. The task will be set toCANCELLED
when it wasSTOPPED
, andDONE
when it wasEXECUTED
.- Parameters:
taskId
- the ID of the task- Returns:
- the ID of the new task.
-
effectiveDictionary
@GET @Path("dictionary") Map<String,String> effectiveDictionary(@QueryParam("environment") String environment, @QueryParam("applicationVersion") String applicationVersion, @QueryParam("application") String application, @QueryParam("container") String container) Get the effective dictionary for an environment, optionally filtered by application and container. This will return the dictionary that is used when deploying to a specific environment. If an application/applicationVersion is passed, the dictionary is filtered to apply only to deployments of that application. If a container is passed, the dictionary is filtered to apply only to deployeds pointing to that container in the environment.- Parameters:
environment
- The ID of the environmentapplicationVersion
- The ID of the applicationVersion (package) (optional, can be null)application
- The ID of the application (optional, can be null). This parameter will be ignored if the applicationVersion is provided.container
- The ID of the container (optional, can be null)- Returns:
- the entries of the dictionary as it applies to a deployment to that environment
-
generateSelectedDeployeds(com.xebialabs.deployit.engine.api.dto.SelectedDeployment)