{"id":20138545,"url":"https://github.com/thiagobarradas/azure-devops-pipelines-demo","last_synced_at":"2025-04-09T18:08:49.496Z","repository":{"id":44455931,"uuid":"196314940","full_name":"ThiagoBarradas/azure-devops-pipelines-demo","owner":"ThiagoBarradas","description":"Azure DevOps (Build Pipeline and Relelse Pipeline) Demo ","archived":false,"fork":false,"pushed_at":"2019-08-08T06:55:59.000Z","size":29,"stargazers_count":16,"open_issues_count":0,"forks_count":31,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T20:05:51.721Z","etag":null,"topics":["azure","azure-devops","azure-pipelines","ci","continuous-delivery","continuous-integration","demo","dotnet","dotnet-core","microsoft","sample"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThiagoBarradas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-11T03:40:49.000Z","updated_at":"2024-02-29T10:18:37.000Z","dependencies_parsed_at":"2022-08-30T02:31:02.752Z","dependency_job_id":null,"html_url":"https://github.com/ThiagoBarradas/azure-devops-pipelines-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiagoBarradas%2Fazure-devops-pipelines-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiagoBarradas%2Fazure-devops-pipelines-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiagoBarradas%2Fazure-devops-pipelines-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThiagoBarradas%2Fazure-devops-pipelines-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThiagoBarradas","download_url":"https://codeload.github.com/ThiagoBarradas/azure-devops-pipelines-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248084994,"owners_count":21045135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-devops","azure-pipelines","ci","continuous-delivery","continuous-integration","demo","dotnet","dotnet-core","microsoft","sample"],"created_at":"2024-11-13T21:38:40.125Z","updated_at":"2025-04-09T18:08:49.470Z","avatar_url":"https://github.com/ThiagoBarradas.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure DevOps - Pipelines Demo\n\n## All tools in this demo\n\n- .NET Core 2.2 / xUnit (Application and tests)\n- Azure DevOps (CI/CD)\n- Sonarqube (Code quality analysis)\n- Docker (Package / Containerization app)\n- Docker Hub (Registry for docker images)\n- Runscope (Integration tests)\n- Azure (Infra to deploy)\n\n## 1 - Appliciation development\n\n- [Application](https://github.com/ThiagoBarradas/environment-api);\n- Unit Tests;\n- Dockerfile;\n- All tests locally;\n\n## 2 - Azure DevOps - Overview \n\n- [Create account and connect with GitHub](https://azure.microsoft.com/pt-br/services/devops/);\n- Create a single project to aggregate applications;\n- Create variable group in pipelines Library;\n\n## 3 - Create Azure Build Pipeline\n\n- [Predefined variables for Build Pipeline](https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops\u0026tabs=yaml)\n\n## 3.1 - Create Build Step\n\n- Create initial variables\n- Create build step and commit; \n- See build results;\n- Add store artifact;\n- Commit and see results again;\n\n[azure-pipelines.yml result](https://github.com/ThiagoBarradas/azure-devops-pipelines-demo/blob/master/build-pipelines/1-build.yml)\n\n## 3.2 - Create Unit Tests Step\n\n- Create tests step and commit; \n- See tests results;\n- Add store artifact / publish code coverage and test results;\n- Commit and see results again;\n\n[azure-pipelines.yml result](https://github.com/ThiagoBarradas/azure-devops-pipelines-demo/blob/master/build-pipelines/2-build-test.yml)\n\n## 3.3 - Create Quality Analysis Step\n\n- [Install Sonarcloud Extension](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud)\n- [Register and setup project at Sonarcloud](https://sonarcloud.io)\n- [Generate SonarCloud token and create a service connection in Azure DevOps](https://sonarcloud.io/account/security);\n- Get `project_key` and service connection name and add to pipeline;\n- Create QA step and commit;\n- See results in Azure DevOps and SonarCloud;\n\n[azure-pipelines.yml result](https://github.com/ThiagoBarradas/azure-devops-pipelines-demo/blob/master/build-pipelines/3-build-test-qa.yml)\n\n## 3.4 - Create Docker Publish Step\n\n- [Create account and create a project in Docker Hub](https://hub.docker.com)\n- Create a service connection in Azure DevOps to connect with Docker Hub;\n- [Conditions in Azure Pipelines](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops\u0026tabs=yaml)\n- [Replace Tokens in Dockerfile using other Extension ](https://marketplace.visualstudio.com/items?itemName=qetza.replacetokens)\n- Create PublishDocker step and commit;\n- See new images in Docker Hub and run locally to check if new image works fine;\n\n[azure-pipelines.yml result](https://github.com/ThiagoBarradas/azure-devops-pipelines-demo/blob/master/build-pipelines/4-build-test-qa-dockerpublish.yml)\n\n## 4 - GitHub Status Check\n\n- Create a new branch with some change and create a pull request;\n- Check commit and PR build status;\n- [See about skip CI build](https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops\u0026tabs=yaml)\n\n## 5 - Badges\n\n- Go to Azure DevOps Build Pipelines project dashboard and get your badge in top-right menu, 'Status Badge'\n- Go to Sonarcloud Dashboard and click in 'Get Project Badges'\n- Get badges for Quality Gate Status, Code Coverage\n- Go to Shields.io to generate other badges for SonarCloud;\n- Add in project README.md\n\n[README.md badges result](https://github.com/ThiagoBarradas/azure-devops-pipelines-demo/blob/master/badges/badges.md)\n\n## 6 - Prepare Infrastructure\n\n- [Create a service using Azure App Service](https://portal.azure.com/#create/Microsoft.WebSite)\n- [Swap Web App in Azure](https://docs.microsoft.com/pt-br/azure/app-service/deploy-staging-slots#to-rollback-a-production-app-after-swap)\n\n## 7 - Create Azure Release Pipeline \n\n- [Predefined variables for Release Pipeline](https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops\u0026tabs=yaml)\n\n## 7.1 - Create Deploy Step\n\n- Create a single container/environment in Azure Web App\n- Simulate Deploy\n- Create Staging Environment\n- Deploy to staging\n- Then Swap Slots\n- [Deploy Link](https://aka.ms/azurewebapponcontainerdeployreadme)\n- [Swap Link](https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/AzureAppServiceManageV0)\n\n## 7.2 - Create Integration Test Step\n\n- Create Runscope Tests\n- Install [Runscope Extension](https://marketplace.visualstudio.com/items?itemName=ThiagoBarradas.runscopetest)\n- Setup Runscope Task\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagobarradas%2Fazure-devops-pipelines-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiagobarradas%2Fazure-devops-pipelines-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagobarradas%2Fazure-devops-pipelines-demo/lists"}