Third-party deployment

3 minute readReferenceAutomation

The CloudBees CD/RO third-party deployment feature allows you to perform deployments using your own deployment tools and still enjoy the benefits of CloudBees CD/RO application modeling. CloudBees CD/RO simplified the process for using third-party tools for deployment by introducing Deploy and Undeploy options in pipeline tasks. If application and/or component versions are included in the task definition, environment inventory, path to production, and deployment analytics data will be updated with these values when the task runs.

With this approach, CloudBees CD/RO delegates deployment to the third-party tool and CloudBees CD/RO uses the version values directly without knowledge of what the third party tool actually does. In principle, the version values can be passed to the third party tool to direct its actions. This requires additional configuration. It is also possible to update environment inventory, path to production, and analytics based on the response from the third party deployment tool.

Create a deployment task that triggers a third-party tool to perform a deployment

The following steps create a deployment task definition. As part of the definition, you must specify the name and project name for an external application and environment. The external application and environment are used to associate inventory and analytics data. When the task is run, if the application or environment do not exist, the application and environment models are created, and the versions supplied are used to update the inventory. The new external application and environment are used to associate inventory and analytics data. When the task is run, the application and environment models will be created and the versions supplied will be used to update the inventory.

  1. Navigate to the release or pipeline that you want to add a deployment task using a third-party tool.

  2. Select Add Task from the stage’s three-dots menu.

  3. Enter a task identifier in the New Task field, then click Select Task Type. The Task Type dialog displays.

  4. Select one of the following task types:

    • CI Job

    • Procedure

    • Command

    • Plugin

  5. Select Define.

  6. Select or enter the required details for the selected task type.

  7. Select Deploy task.

  8. Select the project for the external application.

  9. Select or add the external application name.

    Third-party applications shown or created here are assigned the External application type.
  10. Select or add an environment name.

  11. Enter the application and/or artifact versions.

  12. Select OK.

Create a deployment task that triggers a third-party tool to perform an undeployment

  1. Create a pipeline task of the following type.

    Only the pipeline task types below support undeploy as a sub-task type:
    • Plugin procedure

    • Project procedure

    • CI job

    • Command

  2. Flag the task to indicate that it is an undeploy task.

  3. Enter the application, environment, and version details.

Use the third party deployment response for inventory and analytics updates

Upon successful completion of the Deploy sub-task type, if the ec_deployment_artifacts property exists for the job, the CloudBees CD/RO server reads the properties to update the inventory and sends the deployment data to the CloudBees Analytics server.

The property value should be in the following JSON format:

{ "deploymentSystem": "name of the 3rd-party tool", "deploymentUrl": "URL for this deployment job in the 3rd-party tool", "applicationVersion": "your-applicationVersion-optional", "artifacts": [ { "artifactName": "your-artifactName-1-required", "artifactVersion": "your-artifactVersion-1-required", "artifactUrl": "your-artifactUrl-1-optional", "additionalDetails": { "deploymentTargets": "deploymentTarget-1-optional, deploymentTarget-2-optional", "detail1": "value1", "detail2": "value2" } }, { "artifactName": "your-artifactName-2-required", "artifactVersion": "your-artifactVersion-2-required", "artifactUrl": "your-artifactUrl-2-optional", "additionalDetails": { "deploymentTargets": "deploymentTarget-3-optional, deploymentTarget-4-optional", "detail1": "value1", "detail2": "value2" } } ] }

The example at Third party deploy parse response illustrates how to accomplish this.