Interconnection Test Before the Operation
Prerequisites
Before the operation, test the interconnection between Jenkins and GitLab to ensure that Jenkins can access GitLab through APIs.
Generating a GitLab Access Token
- Log in to GitLab.
- Move the cursor to the account name in the upper right corner and click Edit profile.
Figure 1 Editing page
- Click Access Tokens, enter Token name, select api, and click Create personal access token.
Figure 2 Creating an access token
The token will be displayed on the right of Personal Access Tokens.
Note: The token is displayed only when it is generated for the first time. Otherwise, you need to create it again next time. This token is used only for GitLab interconnection tests.
Figure 3 Token display
Configuring the Interconnection Between Jenkins and GitLab
- Enter http://{IP address of the Linux VM where Jenkins is installed}:8080 in the address box of the browser to log in to Jenkins.
- Choose Manage Jenkins > Configure System. In Configuration, select Gitlab.
- Configure the GitLab URL, click Add under Credentials, and select Jenkins.
- Select Username with password from the drop-down list, select Gitlab API token, and configure the GitLab access token in Generating a GitLab Access Token to the API token.
- Select Gitlab API token for Credentials and click Test Connection. If Success is displayed, the interconnection is successful.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot