Once code review is completed and pull requests are merged into the main, staging, or development branch, the Bitbucket CI pipeline generates a build artifact containing custom code. This section provides the steps to deploy this custom code project to a Conga RLC development, test, or staging environment using custom code APIs.

Once you have confirmed the code is ready to deploy on the production environment, raise a ticket to the Conga CloudOps team. In the ticket, provide the package name and version that you intend to deploy.

Prerequisites

A Bitbucket repository is configured. For more details, see Configuring a Bitbucket Repository with Conga Platform.

To deploy custom codes to Conga RLC

  1. Log in to Bitbucket and go to the target repository.
  2. Go to the sidebar menu and click Download. The list of build artifact packages, along with their versions, is displayed.
  3. Use these APIs as needed:

    ActionAPI Endpoint
    Get deployment artifact packages

    Fetches a list of deployment packages that are yet to be deployed.

    GET <base-address>/api/extensibility/v1/deployment/packages

    Sample response

    {
      "Success": true,
      "Data": [
        {
          "PackageName": "repositoryname__branchname__2",
          "ImportedOn": "2023-08-04T01:51:42"
        },
        {
          "PackageName": "repositoryname__branchname__1",
          "ImportedOn": "2023-08-02T13:33:02"
        }
      ],
      "StatusCode": "OK"
    }
    CODE
    Deploy package

    Deploys the package asynchronously. Package may contain CustomCode, Configuration, and Schema.

    GET <base-address>/api/extensibility/v1/deployment/package/deploy

    Sample build artifact package name: democustomer-pipeline-test__master__1

    Sample Payload

    {
        "PackageName": "democustomer-pipeline-test__master__1"
    }
    CODE

    Sample Response

    {
        "Success": true,
        "Data": {
            "PackageName": "democustomer-pipeline-test__master__1",
            "DeploymentId": "f7994a15-df7f-41d6-aef8-9977c2fddd35"
        },
        "StatusCode": "Created"
    }
    CODE
    Track package deployment status

    Gets the status of the package and any available resource for the given deployment ID.

    GET <base-address>/api/extensibility/v1/deployment/{deploymentId}/status

    Sample success response

    {
      "Success": true,
      "Data": {
        "Name": "package-name",
        "Status": "Inprogress",
        "DeploymentId": "deployment-id",
        "ProjectStatus": [
          {
            "ResourceName": "custom-code-1",
            "ResourceType": null,
            "Status": "Inprogress"
          }
           {
            "ResourceName": "custom-code-2",
            "ResourceType": null,
            "Status": "Inprogress"
          }      ]
      },
      "StatusCode": "OK"
    }
    CODE
    Get package deployment log

    Retrieves the package deployment logs for the given deployment ID.

    GET <base-address>/api/extensibility/v1/deployment/{deploymentId}/logs

    Fetch log data

    Retrieves the worker logs for the given deployment ID.

    POST <base-address>/api/telemetry/v1/logs/start-time/{startTime}/end-time/{endTime}

    Sample payload

    {
      "CustomCodeDeploymentId": "f7994a15-df7f-41d6-aef8-9977c2fddd35",
    }
    CODE

Custom code is accessible from the custom code user interface. For more details about accessing, downloading or deleting custom code, see Working with Custom Code via User Interface.

We recommend using the Custom Code API for deployment, though you can upload a single custom code project using the Import feature. For more details, see Importing Custom Code.