- Access to an Azure DevOps account and project. Sign up for free here.
- Git must be set up and configured in your Coalesce Org. Azure DevOps Pipelines are flexible and can be configured with all git providers that Coalesce supports.
Azure DevOps has multiple configurations for agents that include self-hosted or Microsoft-hosted (requires an Azure subscription). Coalesce can use an existing agent pool if your organization already has pre-configured agents.
- Details on setting up an Azure DevOps agent can be found in Microsoft's documentation.
- Take note of the agent pool name when setting up the agent as you will need this when defining the
poolin your pipeline definition (
azure-pipelines.yml). In the examples below, we will use
pool: defaultsince that is how our agent pool is configured.
To follow best practices, Coalesce recommends that you upload your coa config file as a secure file within the Azure DevOps Pipeline.
- From within your Azure DevOps Project, select Pipelines and subsection Library from the left sidebar.
- Select + Secure File to upload your coa config. By default this file is in
~/.coa. Take note of the file name for the next section.
- From within your Azure DevOps Project, select Pipelines and subsection Pipelines from the left sidebar.
- Select Create Pipeline and follow the wizard to connect your git repository to the Azure DevOps Pipeline.
- When prompted to Configure your pipeline, select Starter pipeline
- When prompted to Review your pipeline YAML, replace the
azure-pipelines.ymlcontents with the following code.
On the YAML Example Code
The below is an example for an hourly refresh on the main branch, although it could be modified for a daily deploy, a different branch, or other options.
pool: default variables: - name: coalesceCliVersion value: "1.0.112" schedules: - cron: "0 * * * *" displayName: Hourly Refresh branches: include: - main steps: - task: [email protected] name: coaConfig displayName: 'Download coa config' inputs: secureFile: 'config' - task: [email protected] inputs: script: | # Install Coalesce CLI tool, if not installed npm list -g | grep "@coalescesoftware/[email protected]$(coalesceCliVersion)" || npm install -g @coalescesoftware/[email protected]$(coalesceCliVersion); # Start refresh coa refresh --config $(coaConfig.secureFilePath);
- Remember to click Save
- Now manually test your new pipeline by selecting Run to kick off your refresh.
Updated about 1 month ago