22:Sonarqube Integration for Node JS Project using GitLab CI/CD | GitLab CI CD Pipeline Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello friends welcome back to devopscent in this video we are going to learn sonar cube integration for node.js project and here you can see here i am using droplet of digital ocean and this is ubuntu droplet and in ubuntu droplet we are going to install gitlab runner and node.js so here i am using droplet of digital ocean then here you can see this is my sonarqube dashboard and in my sonar cube i have to project first my app then sonar cube java gradle then here this is my repository with the name node.js project and in my repository i have few files you can see here and now the first step is we are going to install gitlab runner on our digital ocean droplet that means this ubuntu droplet so you can see how this is the official page of gitlab runner you can install from here also so here you can see i have already installed gitlab runner and this is my runner and here you can see my runner so you can install from here and then you can register runner from here you can see the command for linux so this is my runner so now the next step is we are going to install node.js on our digital ocean droplet so the first step is we need to update our system package so it's done now clear the screen and then the next step is we need to install node.js so using call command now it's done now clear the screen and now we are going to install node.js so it's done now clear the screen now if you want to check the version of your nodejs then you can run the command node hyphen v so you can see the version now clear the screen and now the next step is now we are going to download the sonar scanner package so firstly we need to make a directory and then we need to insert this directory that we have created and now we are going to download the sonar scanner using duplicate command now clear the screen and here now the next step is install unzip if you don't have so now we are going to install this unzip package now it's done so clear the screen and now we are going to unzip this sonar scanner zip file so it's done and now the next step is move to this directory so now we are going to move to this slash opt directory then we are going to edit this uh sonar scanner dot properties file and in this property file we are going to add these two lines so here we need to uncomment this line now save the file and exit now the next step is create a file to automate the required environment variable configuration using this command now we are going to create a new file and in this new file we are going to add this environment variables now save the file and exit and now use this source command to add the sonar scanner command to the path variable okay it's done now if you want to check the version of your sonar scanner then you can run the command sooner scanner hi friendly so you can see the details of your sonar scanner now it's done now the next step is create a new file in your repository with the name sonar hyphen project dot properties and in this directory we are going to add these two lines so go to repository and click on repository then files and here we are going to add new file click on this plus icon then new file and here enter your file name and here your project key node.js now click on commit changes now it's done now let's take the next step so the next step is we are going to add variables in your repository so we are going to add three variables in our repository so firstly go to your settings then ci cd and here we need to add three variables so the variable is if you scroll down you can set the variable so click on expand and here add variables so the first variable is sonar scanner sorry sonar host url so copy the url and paste here and remove this protect variable flag and then add variable then the second variable is sonar login that means your username then the third variable is sonar password remove project variable flag and add variable okay now it's done now let's check the next step so the next step is create a gitlab ci ml file in your repository that means our that means our pipeline so copy the code and now we are going to create our pipeline so click on repository then files and now we are going to creating pipeline so click on this plus icon then add new sorry new file and here enter pipeline name that means dot gitlab iphone ci dot yml and paste the code so here you can see the image name then variables and then in script you can see a sonar scanner then sonar host url that means sonar host url that we have added in variable then sooner login so sooner or later now click on commit changes and now let's set our pipeline so you can see it's running so click on it so wait for few seconds so you can see the message job succeed so let's check in sonar cube so refresh the page and here you can see our project node.js project that we have added in project key that the name devops in slash node.js project so it's done so in this video we have learned sonar cube integration for node.js project so thank you for watching our video i hope you like the video and it's helpful to use so please like share and subscribe our devops channel
Info
Channel: DevOps Hint
Views: 7,433
Rating: undefined out of 5
Keywords: sonarqube tutorial, how to, Sonarqube Integration for Node JS Project using GitLab CI, gitlab ci cd pipeline tutorial, gitlab ci cd pipeline, gitlab ci cd pipeline kubernetes, sonarqube integration with jenkins pipeline, sonarqube jenkins pipeline, sonarqube integration with jenkins
Id: nT2gKApdBLc
Channel Id: undefined
Length: 11min 10sec (670 seconds)
Published: Sun Feb 13 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.