Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Custom Code Project Deployment

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 Advantage Platform development, test, or staging environment using custom code APIs.

Note:

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

Deploying Custom Codes to Conga Advantage Platform

  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:

    Action

    API 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"
    }

    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"
    }

    Sample Response

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

    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"
    }

    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",
    }

    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.

    Note:

    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.