Skip to content

Latest commit

 

History

History
116 lines (61 loc) · 5.77 KB

GETTING_STARTED_APP_DEV.md

File metadata and controls

116 lines (61 loc) · 5.77 KB

Getting Started - Application Developer

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

image

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.

image

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.

Select a Project

Create a New Pipeline

Select Pipelines on the left

Select Pipeline

Create new Pipeline

Create New Pipeline

Select Github as the source

Choose Github

Choose the forked project

Select the Forked Repo

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

Configure Pipeline

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.

Select YAML Path

Review your Pipeline and Run

Review Pipeline

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.

  1. Go to the Pipeline that was created and hit "Edit"

Edit Pipeline

  1. Setup the variables needed by clicking "Triggers"

Triggers

  1. Setup and link the variable groups

Select the Variables groups and hit "Link variable group" Variable Groups

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

Link Variable Groups

  1. Save Variables

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

Save Build

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.

Start Build

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

Stages for Build

Build Details

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

Successful Build

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.