Bitbucket Server integration for Jenkins

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi I'm Martin I'm a developer of the bucket server and today I'm going to take you through the bitbucket server integration for Jenkins we're going to cover how to install it how to configure it and how to set up your first pipeline our integration is the easiest way to link Jenkins with the bucket server it streamlines the entire setup process from creating a web hook to trigger builds and Jenkins to posting build answers back to the bucket server it also supports smart mirroring and lets Jenkins build from mirrors to free up valuable resources on your primary server to use it you need Jenkins 2.16 4.1 or above and also be buckets over 5.5 at a minimum now our first step is to install the plugin you'll need to be an admin to do this within Jenkins go to manage Jenkins then manage plugins and from within the available plugins search for the bitbucket server integration okay you can go ahead and install without restart now the next step is to configure Jenkins to work with bitbucket server so from within Jenkins go to manage Jenkins then configure system because we've installed the plugin they will now be a bit bucket server integration section so from here go ahead and add a bit bucket server instance we're going to call ours bit bucket server and then enter an instance URL making sure to include the HTTP and port numbers okay next we're going to add a personal access token this will allow Jenkins to automatically create push web hooks in the bucket server to trigger build but what they use for anything else Karina's token has to be done inside a big bucket server so from within your PlayBook a server instance go to manage accounts then personal access token and then go ahead and Koreans token we're going to call ours Jenkins off the plugin must have project admin permissions so make sure that you select those and then go ahead and click create you can now copy that token into your clipboard okay now navigate back to the Jenkins instance and from within here go shoot add a new personal access token make sure that the kind is of type bitbucket personal access token if it's not that then it won't show up once you've done that go ahead and paste your token into the field and then give it a description we're gonna call ours bit bucket token okay last of all we're going to add credentials this step isn't mandatory but we recommend it as it'll make an easier for your users to create jobs instead of having to add their own credentials to allow Jenkins to perform build and get operations they'll be able to choose it from the ones that you've added to do this go through add credentials make sure the kinds of username and password and then go ahead and type in your username and password for your particular instance and then give it a name we call this project red credentials okay we can now test the connection to see if everything's been into correctly okay that looks good so now go ahead and save our configuration now we're ready to create our first pipeline now this plug-in supports freestyle and pipeline project types but in this video we're going to focus on the pipelines to create one go to new item give it a name we're gonna call ours project red and then click pipeline okay now within the build triggers select the bitbucket server trigger build after push trigger then if you're using plugins that also interactive in observer they may have their own build triggers so just double check to make sure the text of this trigger is correct now from within pipelines go to you pipeline script from SCM then select the bitbucket server and from here you can enter the details it filled in earlier your credentials and the name of the instance for your project name just start typing in the name that you want and then you can select it from the list same for the repo okay lastly you can choose to if you want to clone from your primary mirror and from your primary server or from a mirror I have a couple of mirrors setup here we're going to clone from the foe boss mirror okay now that we're all done we can go ahead and save our configuration and now we're ready to perform our first build now because we chose the bitbucket server trigger build after push webhook clicking save automatically created the web pub inside of the bucket server you can see this by going back into your bit bucket server instance and then go into your web app repository go to repository settings and then going where books and there it is this will mean that whenever we make a change our repository you will also trigger a building Jenkins and also when we create a building Jenkins you can see that it's added the build status to our particular code there it is okay that's about everything thank you very much for watching if you have any questions or feedback you can send them to us at issues Jenkins - CI org we'd love to hear from you thanks very much and happy building
Info
Channel: Atlassian
Views: 41,049
Rating: 4.7942858 out of 5
Keywords: Atlassian, bitbucket-server, ct-s, ct-t2, jenkins
Id: 0-FugzVYJQU
Channel Id: undefined
Length: 4min 54sec (294 seconds)
Published: Thu Oct 31 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.