Updated on 2025-01-17 GMT+08:00

Jenkins Build Triggered by GitLab

GitLab triggers Jenkins build in either of the following methods:

  • Use the configured webhook to push events and trigger Jenkins build tasks.
  • Modify the file of the specified branch in the build configuration to push events and trigger Jenkins build tasks.

In this example, method 1 is used.

  1. Log in to GitLab and go to the code repository, for example, test-demo. Click Settings and choose Webhooks. Select Push events from the Test drop-down list in the lower right corner, as shown in Figure 1.

    Figure 1 Jenkins build triggered by webhook

  2. Log in to Jenkins. The triggered build task is displayed in the build execution status on the left. Click the build job ID and choose Console Output to view the build output log.
  3. Check the build output log. If a JAR package is built, the deployment is successful, as shown in Figure 2.

    Figure 2 Build output log

  4. Log in to CAE.
  5. Choose Components to check whether the component version is updated.