This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.
In this article, I am providing the step-by-step instructions on deploying a workflow to a Logic App Standard resource through Azure DevOps CI/CD pipelines.
Create an Azure DevOps Project:
You can login to Azure DevOps and create a project under an existing organization or even create a new organization as below.
Choose a name and visibility for the project.
Build a CI pipeline:
1. Create a GitHub Repository with your project files- Host.json, proxies.json and Workflow Folder.
2. Generate Connections.JSON file
To generate Connections.json using managed identity, it is required to use a PowerShell Script to load all the API connections present in the resource group.
Below is a sample PowerShell Script to perform this.
3. Create the build pipeline YAML file:
You can refer the below file for the build pipeline. Save this in your repository.
Please modify the subscription ID, Path to the Generte-connections.ps1 file, source folder and workflow name as appropriate,
4. Go to Azure DevOps project which was created in the first step. Create a new pipeline and choose the source as GitHub.
5. Select the repository, choose the build pipeline and save it.
Build a CD pipeline:
1. Create a CD pipeline in the GitHub Repository. You can refer the below file. Please update the variable file path and add if any connection parameters are there, add them under app-setting as below
2. Update the variable values in the variable YAML file. https://github.com/ShreeDivyaMV/LogicAppsSamples/blob/18a6a559793707cc380b934ea572eaf07edbac66/azure-devops-sample/.pipelines/classic/variables/pipeline-vars.yml
The value for the variable “devServiceConnection” can be retrieved from the service connections tab of Azure DevOps Pipeline settings.
3. Create another pipeline under the Azure DevOps project referring to the file created above.
Run CI and CD pipelines to build and deploy the workflow:
1. Choose the CI pipeline from the Azure pipelines project and click on ‘Run Pipeline’. You can view the status and logs on the same screen.
2. Once it is successful, run the CD pipeline and verify in the Azure portal that workflow is deployed and running fine.
Note: This sample is deploying a workflow to an existing logic app and uses existing connections. In case you would like to deploy a Logic App as well through the CI/CD pipelines, you can refer the repository- logicapps/azure-devops-sample at master · Azure/logicapps (github.com)
GitHub Repository used in this example: LogicAppsSamples/azure-devops-sample at master · ShreeDivyaMV/LogicAppsSamples (github.com)