Released pipeline and CI/CD in azure

There are several ways to deploy an Angular Application to microsoft azure:

  1. The simplest one:  through static web app and github actions
  2. through release pipeline and CI/CD( theme of this blog)
  3. others.


The main steps of deploying an Angular application by released pipeline and CI/CD in Microsoft azure are listed as follows

  1. Create an account in azure. Log in.This is the portal page. azure portal
  2. Confirm if at least one subscription is active. Attention to the cost of subscriptions. Not all services are forever free of charge. azure subscription
  3. Create web service based on active subscription.Please note the service URL. azure service0 azure service1 azure service2 azure service3 azure service4
  4. Deploy your code now. Enter dev.azure.com in browser address bar and so sign into azure devops.If no organization,create one. If no project, create one. azure devops azure devops
  5. Push code to azure. azure devops Refresh the page. azure devops
  6. Create pipeline: There are templates but in this example, we use empty job to assign our own tasks.Task name should reflect the object of task. Firstly, we should install angular-cli. install Secondly, we should build the app. install Third task, we should set the path as 'dist'. THe path name should be right. install
  7. click 'save and queue'. Then click 'save and run' button of pop-up form on right side of screen
  8. Task is executed one by one. The status of agent job is 'success'. install
  9. we have pipelines but no released pipelines. Need add a released pipeline release Add an artifact.  click "save" then "create release" release release release release release release
  10. Change physical path if encounter the error "no permission". release error release error release error release error release error
  11. Change a released pipeline to CI/CD. So every time new code is pushed into Azure repo, the pipeline releasing will be triggered and executed automatically. Edit an existing pipeline and check "continuous integration " box and click "save" cicd cicd cicd click "trigger" and save. cicd cicd

References:
https://www.youtube.com/watch?v=Y51q5K44EZM. Create Release pipelines and deploy an Angular application with CI/CD on Microsoft Azure