{"id":14906,"date":"2019-01-22T03:03:44","date_gmt":"2019-01-22T03:03:44","guid":{"rendered":"https:\/\/www.bridge-global.com\/blog\/?p=14906"},"modified":"2019-01-22T03:22:50","modified_gmt":"2019-01-22T03:22:50","slug":"azure-pipelines-continuously-build-test-and-deploy-to-any-platform-and-cloud","status":"publish","type":"post","link":"https:\/\/www.bridge-global.com\/blog\/azure-pipelines-continuously-build-test-and-deploy-to-any-platform-and-cloud\/","title":{"rendered":"Azure Pipelines- Continuously Build, Test and Deploy to Any Platform and Cloud"},"content":{"rendered":"<p>In software engineering, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Continuous_integration\" rel=\"noopener\" target=\"_blank\">Continuous Integration (CI)<\/a> is the practice of merging all developer working copies to a shared mainline, several times a day. CI can be done using different tools such as <a href=\"https:\/\/azure.microsoft.com\/en-in\/services\/devops\/pipelines\/\" rel=\"noopener\" target=\"_blank\">Azure Pipelines<\/a>, <a href=\"https:\/\/jenkins.io\/\" rel=\"noopener\" target=\"_blank\">Jenkins<\/a>, <a href=\"http:\/\/www.jetbrains.com\/teamcity\/\" rel=\"noopener\" target=\"_blank\">TeamCity<\/a>, <a href=\"https:\/\/about.gitlab.com\/product\/continuous-integration\/\" rel=\"noopener\" target=\"_blank\">GitLab CI<\/a>, <a href=\"https:\/\/codeship.com\/\" rel=\"noopener\" target=\"_blank\">Codeship<\/a> etc. Here, we discuss in the context of Azure Pipelines.<\/p>\n<p>Azure Pipelines is used to continuously build, test and deploy to any platform and cloud. We can automate our builds and deployments with Pipelines. <\/p>\n<p><strong><\/p>\n<h5>The Main Features of Azure Pipelines <\/h5>\n<p><\/strong><\/p>\n<p><strong>1. Works with any language and platform<\/strong><\/p>\n<p>Azure Pipelines is the Continuous Integration and <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/learn\/what-is-continuous-delivery\" rel=\"noopener\" target=\"_blank\">Continuous Delivery<\/a> (CI\/CD) solution for any language, application, or platform. We can build, test and deploy Node.js, Python, Java, PHP, Ruby, C\/C++, .NET, Android and iOS apps. It also runs in parallel on Linux, macOS and Windows.<\/p>\n<p><strong>2. Containers and Kubernetes<\/strong><\/p>\n<p>Azure Pipelines helps you to easily build and push images to container registries like Docker Hub and Azure Container Registry. It deploys containers to individual hosts or Kubernetes.<\/p>\n<p><strong>3. Extensible<\/strong><\/p>\n<p>We can explore and implement a wide range of community-built build, test, and deployment tasks, along with hundreds of extensions from Slack to SonarCloud.<\/p>\n<p><strong>4. Deploy to any cloud<\/strong><br \/>\nImplement Continuous Delivery of your software to any cloud, including <a href=\"https:\/\/www.bridge-global.com\/services\/cloud-services\/azure\" rel=\"noopener\" target=\"_blank\">Azure<\/a>, <a href=\"https:\/\/www.bridge-global.com\/services\/cloud-services\/amazon-web-services\" rel=\"noopener\" target=\"_blank\">AWS<\/a> and GCP. it also enables you to visualise deployment to any number of interdependent stages.<\/p>\n<p><strong>5. Advanced workflows and features<\/strong><\/p>\n<p>We can take advantage of easy build chaining and multi-phased builds. It supports YAML, test integration, release gates and reporting. <\/p>\n<p>For working with CI and Azure Pipelines, we use Visual Studio Online which is now called <a href=\"https:\/\/azure.microsoft.com\/en-in\/services\/devops\/\" rel=\"noopener\" target=\"_blank\">Azure Devops<\/a>. This is a proprietary tool from Microsoft Corporation.<\/p>\n<p>To configure the continuous build, we should have a Microsoft Live ID. We need to log in with this ID to the Azure portal and create a project. This will create the DevOps azure pipeline environment for your project.<\/p>\n<p>                                                       <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-1.png\" alt=\"\" width=\"1365\" height=\"652\" class=\"aligncenter size-full wp-image-14908\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-1.png 1365w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-1-300x143.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-1-768x367.png 768w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-1-1024x489.png 1024w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-1-500x239.png 500w\" sizes=\"auto, (max-width: 1365px) 100vw, 1365px\" \/><\/p>\n<p>On the left menu click Pipelines and on the pipelines window and click \u201cNew Pipeline\u201d button<\/p>\n<p>                                                        <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-2.png\" alt=\"\" width=\"1360\" height=\"636\" class=\"aligncenter size-full wp-image-14909\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-2.png 1360w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-2-300x140.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-2-768x359.png 768w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-2-1024x479.png 1024w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-2-500x234.png 500w\" sizes=\"auto, (max-width: 1360px) 100vw, 1360px\" \/><\/p>\n<p>There you need to select the source where your project is located. Also, you need to select the default branch in the repo.<\/p>\n<p>                                                            <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-3.png\" alt=\"\" width=\"1044\" height=\"529\" class=\"aligncenter size-full wp-image-14910\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-3.png 1044w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-3-300x152.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-3-768x389.png 768w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-3-1024x519.png 1024w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-3-500x253.png 500w\" sizes=\"auto, (max-width: 1044px) 100vw, 1044px\" \/><\/p>\n<p>You can add different build steps as NuGet restore, Visual Studio Build, Visual Studio Test, Copy Files etc. based on how you want to build your project and release it to different environments like stage, production etc.<\/p>\n<p>Now on the left menu, click Releases. <\/p>\n<p>                                                           <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-4.png\" alt=\"\" width=\"945\" height=\"372\" class=\"aligncenter size-full wp-image-14911\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-4.png 945w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-4-300x118.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-4-768x302.png 768w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-4-500x197.png 500w\" sizes=\"auto, (max-width: 945px) 100vw, 945px\" \/><\/p>\n<p>We can see the build we create in artifacts and under stages, you can add Release task with Pre-deployment conditions if any. Pre-deployment conditions are conditions such as, approval of specific uses to deploy the changes to the server.<\/p>\n<p>On the task tab, you have the option to set the release like in the image below.<\/p>\n<p>                                                        <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-5.png\" alt=\"\" width=\"560\" height=\"303\" class=\"aligncenter size-full wp-image-14912\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-5.png 560w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-5-300x162.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-5-500x271.png 500w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/p>\n<p>You can enable Continuous Integration in the triggers tab<\/p>\n<p>                                                       <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-6.png\" alt=\"\" width=\"1069\" height=\"330\" class=\"aligncenter size-full wp-image-14913\" srcset=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-6.png 1069w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-6-300x93.png 300w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-6-768x237.png 768w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-6-1024x316.png 1024w, https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/Azure-6-500x154.png 500w\" sizes=\"auto, (max-width: 1069px) 100vw, 1069px\" \/><\/p>\n<p>Also, you can specify connection strings and other global variables specific to the environment in the variables tab.<\/p>\n<p>After setting these settings, you need to save the configuration. Once it is done, you can start testing it by queuing a new build.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>In software engineering, Continuous Integration (CI) is the practice of merging all developer working copies to a shared mainline, several times a day. CI can be done using different tools such as Azure Pipelines, Jenkins, TeamCity, GitLab CI, Codeship etc. &hellip;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":82,"featured_media":15022,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,107],"tags":[145,146,147],"class_list":["post-14906","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","category-programming-guidance","tag-azure-pipelines","tag-microsoft-cloud-service","tag-azure"],"featured_image_src":"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2019\/01\/azure-pipelines-banner-image.jpg","author_info":{"display_name":"Vishnu KJ","author_link":"https:\/\/www.bridge-global.com\/blog\/author\/vishnu-kj\/"},"_links":{"self":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts\/14906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/comments?post=14906"}],"version-history":[{"count":12,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts\/14906\/revisions"}],"predecessor-version":[{"id":15025,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts\/14906\/revisions\/15025"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/media\/15022"}],"wp:attachment":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/media?parent=14906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/categories?post=14906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/tags?post=14906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}