Azure DevOps | Setup CI CD Pipeline Node JS | Build & Release

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys and welcome to linux keta today we are going to set up ci cd in azure dayoffs without further delay let's get started first click on the agent tool and then select the add agent select this self hosted input type give the name and giving the ubuntu aws and click on create then select the agent then first select the new agent and select the linux i am using the linux so that's why i'm selected linux so just use this command follow the simple instruction making the directory and then going to the directory and currently i'm using wget to download the dar file okay so then extract the star file okay so files are going to extracting now okay so after listing down you can see all the configuration are listed now use the config.sh so first so you will see this error to solve this issue just type this command export okay and i can rerun the command you will see this prompt okay select yes and then give the url simply give the url just like this it will be different in your case okay so just give the url and give the authentication token just press enter and after that if you don't know where to get the token just simply right click here add a personal token so i have already token you can create by adding new token just i'm just regenerating the token okay so just copy that token and paste it here just enter it okay now you have to enter the pool name i have given you one to aws i am giving the same name for the agent name also so you can see it is successfully created okay now after this i have to run another command which is given in the instruction so let me just go back to the instruction where we have to set up the pool click on the ubuntu aws then it is offline okay select on the new agent we are going to bring down that offline state to online so we have to run this command first dot run dot sh so i am running on the background so you do not need to rerun again every time okay guys so we can say this data is changed online our agent is online click the back place button and go to the where you want to set up the csd pipeline in which repository so just press the back button or you can directly go to your repository and click on this setup build so this is my node.js code and select the node.js as a configure so it is loading and you can see these steps here these are the by default steps for installing the node.js so i'm not going to do this because i have already installed the node.js to check use this command if it is present then don't add this step okay so i'm removing the all these steps and i'm adding my own code here so you can see this trigger variables pool names steps and scripts i have listed down here and scripts are going to be differ in your case depending on the which configuration you want so but npm install and npm build these are the mandatories okay so let me just go back to the this pipeline and here the command line argument i have also added and i also added the archive files and i am going to push then again to the artifactory so just create this thing so it will take just a couple of seconds now you can see it is in queue mode so first grant the permission permit permit okay so after permitting your job get started to get job get starts to execute so first it is doing the npm install and it will do all the things line by line npm build then it will execute the command line then archive files and do all the configuration okay so our job is executed successfully now now if you have to check the artifacts you can click here under drop you can say our tower file is successfully generated so i am going to extract that tar file to other server or same server you can do that so do that to do that i am going to set up release by plan so select on release and select on the new pipeline sorry uh yeah new pipeline and then select the empty job and give this stage name i'm going to give it as a deploy and close it and add an artifact select your project name so this was my project name and click on add so just this check this pre-deployment condition is on and select on the continuous deployment triggers so click on add include your branch so when your pipeline gets executed it automatically deliver your list by plan also so this is important steps now click on agent job give the agent name i'm giving the ubuntu agent here select your aws agent which we have set up in the agent pool now search for the command line and click on add and just write your own script here i am writing my own script it depends on your project so this is the i'm just giving the different file path name here okay so it will just under the file in the given location so you can give the pipeline name release name this was the first release and you can save this and first create a manual release select deploy and click on create so it is creating so you can check the status from the release so it is currently deploying so it is still not deployed you have to first manually deploy okay so click on deploy and deploy so it is in progress manual trigger is successfully agent pool is running and it will perform all the necessary actions that we have written in the script so it is executing all the steps and it has executed all these steps so okay this was the release pipeline and if you go to the agent directory my agent directory and under word directory if you go r1 in my case it is r2 and cda c underscore dashboard.kit underscore drop you can see the star file right click on the release because i have not given the correct path name here let me go to the task command and it should be r2 instead of r1 in your case it will be different just save it again and after that click on the pipeline we are going to rerun the pipeline after running the pipeline we are going to check our release is also going to automatically deploy or not so select the branch and run click on the jobs so it is started executing and pm install build okay so it will perform the all the actions and after that click on the release from the left side menu so you will see the deployment is also started to get executing for the deletes when you click on this it is waiting for agent now it is executed successfully guys so go to the command prompt and go to the path slashware www.html we have put in our dashboards code so it is under this mcdonald and let me just open the my ip address and let me just check in the browser if it is running or not so give the path name so guys you can see the page is successfully loaded so guys don't forget to subscribe
Info
Channel: Linux Keeda
Views: 5,770
Rating: undefined out of 5
Keywords:
Id: vLL2kpCtqGU
Channel Id: undefined
Length: 10min 1sec (601 seconds)
Published: Sun May 29 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.