I have a Jenkins pipeline that executes a build whenever a change is pushed to the appropriate branch. Jenkins uses an API token to authenticate with the GitLab server and checkout the repository. Besides creating a "Jenkins" user account in GitLab and using that user's API token, is there any other way I can manage GitLab authentication for an automated CI/CD pipeline? Each user of Jenkins currently has their own API token.

Are you doing the building using web hooks or just polling? I think it's inevitable that you'll have to create a Jenkins account to manage API access. This Gitlab link explains how to use the Jenkins Gitlab plugin to manage building when changes are pushed. You'll see they use a Jenkins account as well. This is common practice in my organization to remove single points of failure, such as a departing employee.

  • I am using webhooks. Thanks for the link! I – PrestonM Aug 8 at 15:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.