Create CI/CD 'Buld pipeline' for Web Application

Create a Webapp 

  • Upload in Git at some Repository
  • Create a Repository ‘WebAppWithDatabaseDemo-master’ and clone the same at local
  • Create our app and then upload

 

In DevOps

  • Can use pre build task using task pop window
    • Through this we can generate may CLI commands like 
  • Pipelines > Create a Pipeline >  Git hub > select .Net Core and create blank Pipeline. will generate CLI commands as follows

 

  • Check and install SDK
  • Restore all Nuget Packages
  • Build the application
  • Run Unit Test
    • Run Unit Test Project
  • Create the web app package using the command Dotnet publish 
  • Upload or publish that zip file into artifacts in my Azure DevOps.
  • Dotnet publish commands that will generate that zip file for me.
  • And then we have to go to upload or publish that zip file into artifacts in my Azure DevOps.

 

Run the Pipeline

 

Check Published / Build Code

in DevOps pipeline, go to Summray tab and click published link 

 

We can see zip of published files

 

 


Related Question