Updated on 2023-10-30 GMT+08:00

Jenkins Build Triggered by GitLab

GitLab triggers Jenkins build in either of the following methods:

  • Method 1: Use the configured webhook to push events and trigger Jenkins build task.
  • Method 2: Modify the file of the specified branch in the build configuration to push events and trigger Jenkins build task.

This section uses method 1 as an example.

Procedure

  1. Log in to GitLab and go to the code repository.
  2. Click Settings, select Webhooks, and select Push events from the Test drop-down list.
  3. 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.

    In the build execution status on the left, you can view the build tasks that have been triggered.

  4. Click the build task ID and choose Console Output to view the build output logs.
  5. Log in to ServiceStage.
  6. Choose Component Management.
  7. In the Component List area, click the target component. The component overview page is displayed.

    On the Overview page, check whether the component version and component package code source have been updated.

  8. Click Deployment Record to view the corresponding deployment record.