Intro

This page shall help you to setup automatic Jenkins jobs triggers from Gitlab projects and reporting back results to Gitlab projects/repositories CI.

Please note that this article is currently just high level guideline to achieve integration. It requires certain level of common sense and orientation both in Gitlab and Jenkins to achieve the result.

If you would like to help community of TDS users, you can provide us more detailed instructions how to integrate Jenkins and Gitlab, we will make them generic, anonymized and publish for everyone.

Requirements

  • TDS portal project, more can be found in Project management
  • Possessing project dedicated TDS service account credentials
  • Gitlab repositories created in this portal project
  • Jenkins deployed in this particular project and possessing admin permissions in that Jenkins

Steps

  • grant service account proper accesses into all relevant Gitlab projects/repositories using TDS portal User management
  • get service account token
    • open incognito/private browser window so that you do not interfere with your current Gitlab session
    • login to Gitlab using service account credentials
    • verify that service account has proper access to relevant projects/repositories - at least that it can see them
    • generate the token, give it some reasonable description and validity
    • copy the token somewhere as you will not see it again
    • close the window
  • install Gitlab plugin into Jenkins
    • install Gitlab plugin using plugin manager
    • configure Gitlab details in Jenkins tools configuration
    • use token generated earlier
  • prepare Jenkins job which is expected to be triggered automatically
    • create or navigate to relevant Jenkins job
    • configure the job to accept triggers
  • configure Gitlab project/repository integration with Jenkins job
    • navigate to relevant Gitlab project/repository settings
    • configure trigger(s) for branches and provide Jenkins job URL for triggering
  • No labels