Getting Started - Application Developer
August 27, 2019 · View on GitHub
Overview
This section provide Cobalt technical operators with a general use case Azure DevOps pipeline. Operators can import this yaml based template when creating their pipeline in the Azure DevOPS portal.
Fork the Repository
Fork the cobalt repository that has been created. For more details on creating the initial repository, please review Getting Started
Fork the repository in either github or Azure DevOps

Add Branching Strategy
Add the branching strategy on the newly created fork to ensure the branches are protected. Branch Strategy can be added in Github or Azure DevOps Repo section directly
Git: Master Branch Policies for IAC Repo
We strongly recommend adding branch policies to help protect the master branch and configure mandatory validation builds to avoid simultaneous builds when merging into master.

Here's some more guidance on leveraging Azure DevOPS build validation checks with protected branch's.
Recommended Branch Policies
- ✅ Do - Require pull request reviews before merging.
- ✅ Do - Prevent force pushing e.g. to prevent rewriting the commit history.
- ✅ Do - Require completion of Production stage release in Azure DevOPS before merging.
- ✅ Do - Prevent parallel releases into QA, staging and production environments.
- ✅ Do - Require status checks to pass before merging changes into the protected branch.
Choose an existing project
If a project has not been created within an organization, please refer to Getting Started on directions to create a project.

Create a New Pipeline
Select Pipelines on the left

Create new Pipeline

Select Github as the source

Choose the forked project

Configure the Pipeline and point the build definition to the repository's target yaml pipeline location

Add in the relative path to the target YAML pipeline location
Note: The dropdown to select the YAML file path may not auto populate so a copy and paste of the relative path from the repository may be required.

Review your Pipeline and Run

Modify any changes as needed in the YAML and hit "Run". This is needed to initially save the YAML template.
Note: Build may initially fail until we finish the other steps.
- Go to the Pipeline that was created and hit "Edit"

- Setup the variables needed by clicking "Triggers"

- Setup and link the variable groups
Select the Variables groups and hit "Link variable group"

Link the variable groups for DevInt, QA and Infrastructure one by one

- Save Variables
Drop down into the options for "Save & queue" and select "Save" and hit "Save" to save this build pipeline.

Hit "Queue" and then "Run" to start the build
Note: a specific commit can be picked from the selected branch, if nothing is added to the commit text box, it will default to the latest commit.

The build will run through the stages and upon select a stage, more details will be presented on what the build is doing


Upon a successful build, all jobs will be marked off in green and shown as completed

Note: you may need to enable the experimental feature to allow multi-stage build pipelines if your view does not show the stages of the build pipeline. Directions for enabling preview features are available here.