How to Create a CI/CD Pipeline in Azure DevOps Using Classic Editor

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so create a new pipeline when we create a new  pipeline we have two ways of doing it in Azure   repos modern and more sophisticated way of  doing that is using yaml file but I'm doing   it right now for demo purpose using classic  editor comparatively it's easy now when we   want to build our pipeline where should we  take the source code from so these are the   possible sources from where our source code  can come from I'm sticking to aure repos G   my project hello web app in the project  we can have multiple repositories and in   the repository we can have multiple Branch  we are not getting into all those branching   policies and stuff I just want to take my code  from the master Branch I take it so what kind   of project is mine it's asking me mine is an  asp.net core web application so I can simply   add this I can take this template and this  template would generate some basic steps automatically and you see here remember on  local machine I executed these commands net   restore representing the net restore is this  net build is this I don't have test project   so for now I can actually disable this if  you have a test project you should enable   this also then net publish that's what is this  and finally I told you whatever is published   we would like to move that into aure artifact  so yes you can see there is a pipeline inside   the pipeline this is an job which is going to  use an agent agent is a machine on which all   these task tasks are going to execute and when  we select here pipeline agent specification   given is ubun 264 basically an Ubuntu machine is  going to be used as agent net core applications   can compile on Ubuntu can compile on Windows  can I compile on mechin toost I can actually   choose any one of these so I'll keep it as  Ubuntu only I'm not changing it or maybe   yes we can switch to Windows alternative  it's your choice doesn't really make any   difference in the process you can give here  the name to your build pipeline hello web app build pipeline aure pip and when you want to use  Microsoft hosted we should use Azure pipeline   if there is a selfhosted agent a machine  which is created and deployed by you or   your organization then we should choose that here  we're not doing that now the name of the project   which has to be compiled which will be used in  multiple parameters and you can see here the   same project file is used build configuration  I wrote if you remember configuration release   but here it's a variable and the value of that  variable can come from here build configuration release and then publish also release what  is important is at the time of publish the   output directory where the content is published  is called as artifact staging directory and the   build the published artifact is actually  responsible for reading the content from   artifact staging directory and Publishing into an  artifact called as drop drop is an artifact which   is created so the end result of this pipeline  is under drop artifact we are going to have   the published output of our project so let's  run this pipeline this is the pipeline unless   you run it's of no use so I'll do here save  and Q yq we cannot run the pipeline directly   we can only request for execution as we are  using here Microsoft hosted agent we can only say put put it in the queue and whenever the  agent becomes available it's going to start so   I'll go back now and see that the pipeline  has started and it's running go to agent job and you see it's waiting for the que acquired it there are three variables release anytime  Falls whenever it gets the agent this process   is going to start and the result of completion of  the agent job would be an artifact which will be   shown to us as a link and we can use that so let's  wait because sometimes the agent is acquired very   fast and sometimes it take little little time  Max a minute but yes in the meantime as it is   happening this is what I have done I've created  a build Pipeline and in the build pipeline I have   tasks for all this and we are actually interested  in looking at the output from publish artifact and   you see the pipeline has started checkout has  performed restore command is executing build   command will execute after that see all the  things what happened on my local machine same   things are happening here this all commands are  running on an a agent machine it's a Microsoft   hosted agent we are only I mean hosted agent is  provisioned for us and when this pipeline ends   the agent is destroyed deprovisioned and the  content is available in artifact and you can   see the artifact here one artifact is generated  click drop is the name of the artifact I showed   you earlier and we have the zip file we can  download this this is precisely the build   output which we have seen locally exactly same  thing I have shown to you on my local machine   earlier so the whole process is automated the  complete build is automated of course in real   time we are going to do lot of additional things  we might do unit testing we might do code coverage   testing we might do vulnerability test we might do  licensing test so many things are going to happen   as a part of a continuous integration pipeline  now why are we saying continuous integration   reason is simple I can go to the pipeline I can  configure the pipeline in such a way that I can   select the pipeline edit and I'll go to the  pipeline and configure it in such a way that   it automatically gets triggered as soon as my  source code is edited and committed to the repo   so as soon as any kind of change I make to the  master branch and publish I want the pipeline   to automatically trigger so now I'm just saving  it I'm not queuing it I've enabled continuous integration and now what I'm  going to do is keep this pipeline View there's only one run which has  happened I'm going to do something   here which will create one more run  here and what is that let's say I go   to visual studio code edit my source  code for Simplicity I'll just change the some text close this after saving  now these changes I should first commit   locally and then move to the aure repo and as  soon as I move to aure repo you'll see that   here a new run will start let's see so first  I'll stage the content then I will commit the content with some commit comment and  and get push origin master I'm pushing   the content to the master Branch as soon  as this is posted you'll see here I have   done nothing on the right hand side  it should automatically start a new run see it has come I did nothing  you can see that and this is C up so this is continuous process you  only need to commit the changes to   local and push the changes to the  report uh uh aure aure repository   the central repository Global and the whole  process will just continue every time unit   test will be performed every time code  coverage testing all those rules which   are required for every prop proper way of  execution can be pretty well implemented here
Info
Channel: BestDotNetTraining
Views: 6,324
Rating: undefined out of 5
Keywords: #deccansoft, #bestdotnettraining, #deccansoftazure, #azure, #azuredevops, #Sandeepsoni, Azure ci.cd, Azure devops pipelines, How to create pipelines, How to Create a CI/CD Pipeline, How to Create a CI/CD Pipeline in Azure DevOps Using YAML, YAML, azure artifacts, classic editor, cicd pipelines, how to create a pipeline, build a pipeline, how to create a azure pipeline, How to create pipeline is azure devops, create a cidc pipelines using yaml, azure artifacts tutorial
Id: lC5c7MyA_Fg
Channel Id: undefined
Length: 10min 9sec (609 seconds)
Published: Fri Oct 13 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.