The pipeline will automate provisioning and updating the server-side rendering infrastructure and application in Azure.
Where possible, we are creating reusable steps (stacks-pipeline-templates) that can be pulled into any base pipeline. Reusable steps can include tasks to deploy, build, test and more.
Setting up Azure DevOps
A variable group will need creating for storing application variables to be used throughout the pipeline. Instructions for creating a variable group can be found here. Give the variable group a name and description and make sure the Allow access to all pipelines option is checked.
Add the following variables:
|Variable Name||Required for||Note|
|MENU_API_URL||Application Backend||Output of a Stacks backend workload|
|NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN||Application CMS||from Contentful|
|NEXT_PUBLIC_CONTENTFUL_SPACE_ID||Application CMS||from Contentful|
|SONAR_ORGANIZATION||Static Code Analysis||from sonarcloud|
|SONAR_PROJECT_KEY||Static Code Analysis||from sonarcloud|
|SONAR_PROJECT_NAME||Static Code Analysis||from sonarcloud|
|SONAR_TOKEN||Static Code Analysis||from sonarcloud|
Update pipeline template placeholders
Where possible, the scaffolding CLI will have populated the correct values in the pipeline template file
build/azDevops/azure/app-pipeline.yml. The values that need to be manually configured, such as the variable group name setup previously, will have placeholders using the prefix
%REPLACE_ME_FOR. We very much recommend that you go through the whole template to make sure that values are correct for your project. Once you are happy with the template, commit the changes to your repository.
Create the pipeline
Follow the steps below to create the pipeline and trigger the initial run.
- In the pipelines section of Azure DevOps, select New Pipeline.
- Select your repository.
- Select the Existing Azure Pipelines YAML files option and enter the path
- Click run and wait for the pipeline to complete.