How to: Deploy with Azure DevOps

Promotion of Spark services from one tenant to another using the ImpEx APIs can be integrated with Azure DevOps Pipelinesarrow-up-right facilitated by PowerShellarrow-up-right scripting.

Prerequisites

  • Client Credentials configured in both the source and destination tenants with access to the source and destination targets.

  • All referenced services must have a compiled Neuron WebAssembly module.

  • Any destination folders need to already exist and be accessible with the provided authorization.

Information flow

  1. Azure DevOps Pipelinesarrow-up-right is used to execute the attached PowerShell script.

  2. The PowerShellarrow-up-right script performs the following steps:

    1. Acquires client access tokens for both the source and destination tenants via using Client Credentials grant (OAuth 2.0).

    2. Initiates the Export API package generation job in the source tenant.

    3. Checks the GET export status API for the completed job.

    4. Once completed, it downloads the package.

    5. The package is then uploaded to the destination tenant and deployed using the Import API.

file-download
6KB

PowerShell script parameters

The parameters for the PowerShell script are aligned with those from the Export and Import APIs. It is recommended to understand the capability there before defining the parameters of the script.

Key
Value

exportEndpoint

Reference Export Export https://excel.{environment}.coherent.global/{tenant}/api/v4/export

importEndpoint

Reference Import Import https://excel.{environment}.coherent.global/{tenant}/api/v4/import

serviceUriSource and serviceUriDestination

Reference Export Request body inputs.services and Import Request body inputs.services_modify Example: myfolder/myservice

sourceSystem

Reference Export Request body source_system Example: mycicd

correlationId

Reference Export Request body correlation_id Example: 456

servicesExisting

Reference Import Request body servicesExisting Example: add_version

sourceKeycloakMetadataUri and destinationKeycloakMetadataUri

Source of the Keycloak OpenID endpoint configuration. https://keycloak.{ environment}.coherent.global/auth/realms/{tenant}/protocol/openid-connect/token

sourceKeycloakClientId and destinationKeycloakClientId

The client ID for the source Keycloak client. Example: client-credentials

sourceKeycloakClientSecret and destinationKeycloakClientSecret

The client secret for the source Keycloak client. Example: 9Oh1nscDtPzMehwA3ejKJFAar3RRktHY

Setup the pipeline in Azure DevOps

  1. Read the article Use a PowerShell script to customize your pipelinearrow-up-right and follow the appropriate instructions for your Azure instance.

  2. Push the PowerShell script ImpEx.ps1 to the root of the project repository.

  3. Add the completed YAML code to the pipeline file.

    Empty template
    Sample

Last updated