Dev and tooling
As part of our solution we are developing a Teams App for staffing raids, which uses an Azure Function App to get dataverse data. The toolchain setup for doing this consists of Visual Studio Code, Azure Devops Pipelines and Azure Services.
To speed up our delivery we have implemented a CI/CD pipeline that deploys the infrastructure and backend code to an Azure Function App. The process works like this
- We develop a new feature with Visual Studio Code
- We push the feature to the main branch
- The Azure pipeline is triggered and executes two stages
- Build stage
- The .NET code is built as a deployable zip
- Dev stage
- Then infrastructure is deployed with Azure Bicep
- The zip is deployed to the newly created Azure Function App
We have modularized the stage jobs in templates, so we only need 9 lines of code to add another environment to our application.
To deploy our infrastructure with Bicep we use a Devops Service Connection to authorize operations with the Azure CLI.
Take a look at line 49 – here we read the output variables from the Bicep deployment in order to retrieve the name of the function app. We later retrieve and use this Devops pipeline variable in the job that deploys the code to the Azure Function App.
The infrastructure is defined in the .bicep file above which also utilizes other Bicep modules. In order to avoid explicitly including secrets we feed it from a Azure Key Vault. A link to the Key Vault Secret is passed to the Azure az group create command in a json file.
We deploy a frontend-app as well. The build is made and artifacts are created for the spfx-app and for the teams-manifest. We then have a release pipelines that utilize npm and m365 cli for deploying the app to the sharepoint app catalog and to Teams. The scripts are written with powershell.
For now it only displays basic pirate data from Dataverse