Gitlab integration
What is GitLab?
GitLab is a web-based Git repository manager with a set of various tools for software development. It lets developers host, manage and collaborate on their code with the help of code review, issue tracking, and merge request features.
Adding your GitLab repositories in Buddy allows you to create CI/CD pipelines and automatically perform deployment steps defined in them. You can e.g. set up a pipeline that will build, test and deliver your app on every push to your GitLab repository.
On top of that, you can run commands and operations in GitLab directly from Buddy using the GitLab CLI action.
Setting up a GitLab integration
- Go to the Integrations tab and click New integration.
- Look up and click GitLab (you can find it in the Git section):
Image loading...GitLab integration selection
When the configuration window shows up, provide the integration name and select the authorization method:
Image loading...GitLab integration configuration
- Once everything is set, click Add a new integration to finish the configuration.
OAuth authorization
- In the integration configuration window, select OAuth as authorization method and click Start OAuth authorization:
Image loading...GitLab OAuth authorization configuration
- Log in to your GitLab account and authorize Buddy to use it:
Image loading...GitLab authorization screen
Personal access token authorization
- Go to https://gitlab.com/-/profile/personal_access_tokens or click Generate Token in the configuration window.
- Click Add new token.
- Provide token name, expiration date and select the appropriate scopes:
Image loading...Personal access token configuration in GitLab
- Copy the generated token and paste it in the integration window in Buddy.
What is GitLab EE/CE?
GitLab Enterprise Edition and Community Edition are two different distributions of this repository manager tool. GitLab CE is the free, open-source version suitable for smaller teams and individual developers, while GitLab EE is the paid, commercial version with additional features and enterprise support.
Connecting your GL repositories with Buddy lets you interact with them and fetch code, run tests and deploy your application based on the triggers defined in the pipeline.
Setting up a GitLab EE/CE integration
- When setting up the integration for the first time, open the Integrations tab and click New integration.
- Look up and click GitLab EE/CE (you can find it in the Git section):
Image loading...GitLab EE/CE integration selection
- The configuration window will show up:
Image loading...GitLab EE/CE integration configuration
Here you have to provide:
- GitLab Enterprise IP or URL
- Personal access token
- Once done, click Add a new integration to add the integration to your roster.
Obtaining GitLab Enterprise personal access token
- In GitLab, click on your avatar and select Edit profile:
Image loading...User profile location in GitLab
- In the left menu, go to the Access Tokens tab and click Add new token:
Image loading...Obtaining personal access token from GitLab
- Enter a name and expiry date for the token.
- Select the desired scopes.
- Click Create personal access token, copy it and paste it in the configuration window in Buddy:
Image loading...GitLab EE/CE personal access token authorization configuration
That’s it! You have synchronized GitLab with Buddy. You can now add a GitLab project and begin with creating your continuous integration pipeline.
Sep 23, 2024