azure-devops-pipelines-demo
azure-devops-pipelines-demo copied to clipboard
Azure DevOps (Build Pipeline and Relelse Pipeline) Demo
Azure DevOps - Pipelines Demo
All tools in this demo
- .NET Core 2.2 / xUnit (Application and tests)
- Azure DevOps (CI/CD)
- Sonarqube (Code quality analysis)
- Docker (Package / Containerization app)
- Docker Hub (Registry for docker images)
- Runscope (Integration tests)
- Azure (Infra to deploy)
1 - Appliciation development
- Application;
- Unit Tests;
- Dockerfile;
- All tests locally;
2 - Azure DevOps - Overview
- Create account and connect with GitHub;
- Create a single project to aggregate applications;
- Create variable group in pipelines Library;
3 - Create Azure Build Pipeline
3.1 - Create Build Step
- Create initial variables
- Create build step and commit;
- See build results;
- Add store artifact;
- Commit and see results again;
3.2 - Create Unit Tests Step
- Create tests step and commit;
- See tests results;
- Add store artifact / publish code coverage and test results;
- Commit and see results again;
3.3 - Create Quality Analysis Step
- Install Sonarcloud Extension
- Register and setup project at Sonarcloud
- Generate SonarCloud token and create a service connection in Azure DevOps;
- Get
project_key
and service connection name and add to pipeline; - Create QA step and commit;
- See results in Azure DevOps and SonarCloud;
3.4 - Create Docker Publish Step
- Create account and create a project in Docker Hub
- Create a service connection in Azure DevOps to connect with Docker Hub;
- Conditions in Azure Pipelines
- Replace Tokens in Dockerfile using other Extension
- Create PublishDocker step and commit;
- See new images in Docker Hub and run locally to check if new image works fine;
4 - GitHub Status Check
- Create a new branch with some change and create a pull request;
- Check commit and PR build status;
- See about skip CI build
5 - Badges
- Go to Azure DevOps Build Pipelines project dashboard and get your badge in top-right menu, 'Status Badge'
- Go to Sonarcloud Dashboard and click in 'Get Project Badges'
- Get badges for Quality Gate Status, Code Coverage
- Go to Shields.io to generate other badges for SonarCloud;
- Add in project README.md
6 - Prepare Infrastructure
7 - Create Azure Release Pipeline
7.1 - Create Deploy Step
- Create a single container/environment in Azure Web App
- Simulate Deploy
- Create Staging Environment
- Deploy to staging
- Then Swap Slots
- Deploy Link
- Swap Link
7.2 - Create Integration Test Step
- Create Runscope Tests
- Install Runscope Extension
- Setup Runscope Task