How To Integrate GitLab With Jenkins

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in this tutorial I'm going to demonstrate you how to create Jenkins with it lab I suppose you already have installed Jenkins on your own if you haven't Jenkins server please refer my previous video I'll put the link in the description now if you don't have any kit lab account please create Hitler pig out as well Gentiles and open-source software development platform which enrich with the continuous integration and that many more they works automation capabilities so you can automate your tasks build does tend to build and deploy tasks okay let's head out the first step first we need to install some plugins on our system Jenkins system so let's head over to manage then thin section and manage plugins and click on the available tab okay you need to install some packages on your system first I'm going to find out forge it package I think it's already installed on the system you can see here you need to install cheap plugin also you need to install cheap lab plugins so you need to install cheat lab jeet lab api authentication plugins installed without restart so it's going to install zip plug-in the club authentication develop api okay then we need to install credentials package as well I think credentials package already been installed on my sister yes it has installed already we have installed did it left it left API credentials it's not authentication plugins on our system okay let's head over to next step and then we need to create personal access token on now is it them let's head over to jet lag account settings and now create access tokens in here you need to provide a meaningful name so I am going to provide Jenkins the Clapp API access click on the API Scott's create personal access token ok please make sure to keep this API token in a safe place for the future usage so I'm going this one saved deployed token so we are safe once you leave or refresh the page you won't be able to access it again so just now save it somewhere once you created the API token it will be available here ok now let's head out to Jenkins server and then we need to add authentication token intelligent in server to do so we need to own 2 credentials click on credential step and system global credentials and click on the add credentials link in here you need to prove your API access token for the jet lab authentication in here you need to select two Club API token as the client section and test your saved API token in here provide some meaningful description for for the future references so I am going to save this one okay now let's head out the next step then we need to configure jet lab API settings on our Jenkins server to do so want to manage an intersection and configure system and move down further you can find out get lab section you can in here you can provide a connection name so I'm going to write cheat lab connection you want to provide the way you clip URL in here and then you need to select your API token that you have entered previously okay now test connection finally secure connection is successful by pressing test connection button if connection successful then go on to next step now connection between Jenkins and jet lag is okay Gitlin api plug-in used to access for Jenkins to get metadata from seed lab but we need to have a SSH key authentication to commit change from Jenkins to get left okay now apply and save okay now let's head over to next step we need now we need to allow G Club build commit push/pull authentication into cheat lab server so to do so there are two ways you can use public/private SSH PPR so I first of all I am going to use public/private key pair method to do so you need to look into Jenkins server terminal and switched into Jenkins user so I am going to you know do my Jenkins user clip Jenkins so Jin Qin's in here we need to generate SSS keeper which include public and private keys so I'm going to generate key ssh-keygen press enter press enter if you don't need any pass fear press enter that's all then let's move on to dot SSH directory and LS now you can see here there are two idea RSA files this one for public usage and another one is private usage then open up the ID RSA to pub key and copy this content keep in mind always select correctly and then move on to you will get lamp account so I am going to deploy a new SSH key or magic lamp account so to do so you need to go to your profile and settings section then go to SSH keys click on that like button and then you need to paste that copied content into this place in here you can try the name as you like so I'm going to just enter this key press add key button ok now our public key has been added to the editor the jig left then let's head over to change in server and click on credentials link click sister global credentials at creators select SSH username with private key option and in here you can provide some descriptive name so I'm going to use that what SSH and always make sure to add PS your username and click on the radio button and add then again we need to move to our console Jenkins server terminal and open up our idea is a private key and copy discontent carefully right then paste them here and click OK always make sure to pry the as you use an app right-click kokanee okay now we have get SSH key authentication project lab server alternatively we can use our plain username and password for authentication with get lab results to do so add credentials use username with password option in here you can provide your own username so I'm going to pry my one password pride digital account password and provide a meaningful descriptive name click ok ok that is actually optional step if you if you like SSH key authentication you can use that one instead the username password ok and now I am going to push my local repository into jet lab to do so first we need to create a project on jet lab nope so I am going to create a new project write a name here and create project and then copy you HTTP URL from here and open your command prompt then I'm going to push my local repository to get clipped [Music] you'd commit and push repositories into it lab server okay now our project is available on yet lab server okay now it's time to create a new project and do a further configuration to do so click on create new jobs link and provide the name right the project name here and select a freestyle project ask you a project type and click OK and give it a name and then hello to a source code management tab in here you need to select get as your source code management option and then you need to copy your URL repository URL from your Gitlin repository so I'm going to select SSH URL and paste it in here select add credentials from the drop-down menu so I'm going to select my ssh authentication method alternatively we can use username password and field that we have provided earlier ok authentication successful they ever know any errors appears in here and then you can do optionally you can use some other options as well so I'm going to enable this section and the bill triggers section finally apply and Save Changes and now it's time to check develop in creation with Jenkins using build Now button click on build now and click on this ok now it's been fitting into our Jenkins server you can see here everything seems to be good ok now good luck fetching SP and succeeded console output output has been succeeded and also you can see here I have used my SSH key public key is the private key authentication alternatively you can use user name password as well ok and now you have learned how to integrate cheat club with Jenkins so I hope you have learned some have some idea about how to deal with it finally thank you for watching and don't forget to subscribe my channel for future tech guides see you again
Info
Channel: Digital Avenue
Views: 32,006
Rating: undefined out of 5
Keywords: jenkins tutorial, jenkins github integration, jenkins, jenkins build, git, github jenkins, install jenkins, jenkins linux, what is jenkins, jenkins install ubuntu, jenkins with gitlab, jenkins gitlab integration
Id: -O4tiLzYJMI
Channel Id: undefined
Length: 16min 44sec (1004 seconds)
Published: Tue May 19 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.