Wednesday, December 16, 2015

Jenkins Integration with Git Server

    Here is my configuration of Jenkins integration with Git Server - in my case Atlassian Bitbucket Server 4.1.3 x64.
  • Install Jenkins ButBucket Plugin in Jenkins
  • Install Bitbucket Server Webhook to Jenkins in Bitbucket via Web GUI, then set parameters of this Repo
    • Go to specific Repo, then go to Settings, then Hooks
    • Enable "Bitbucket Server Webhook to Jenkins"
    • Set Jenkins URL, Repo Clone URL
  • Go to Jenkins
    • Create a Task
    • Set Git Source Code Management
      • Git Repository URL, 
      • Credentials, 
      • Branches (I added two branches - develop, master in my case)
      • Additional Behaviors
        • Additional Behaviors: Check out to a sub-directory: C:\Build\AcRepo
    • Build Triggers:
      • Check option: "Build when a change is pushed to BitBucket"
      • Check option: "Poll SCM": Schedule: H/2 * * * *
        • The schedule follow the syntax of cron. The minimal time I can set is 2 minutes.
  • No once you push code the Repo, Jenkins will pull down the branch you push to, and build the project immediately.
Even though I checked the Poll SCM, with schedule for 2 minutes, the repo will build immediately. If I remote do not check this options, I can not get Jenkins Build.

1 Comments:

At January 6, 2020 at 1:30 AM , Blogger thulannguyen said...

Thanks for sharing, nice post! Post really provice useful information!

Công ty vận chuyển hàng nước ngoài FadoExpress hàng đầu chuyên vận chuyển, chuyển phát nhanh siêu tốc đi khắp thế giới, nổi bật là dịch vụ gửi hàng đi mỹ, gửi hàng đi nhậtgửi hàng đi pháp và dịch vụ chuyển phát nhanh đi hàn quốc uy tín, giá rẻ

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home