Updated on 2024-11-15 GMT+08:00

Installing the Jenkins Plug-in and Configuring Jenkins

Before using GitLab to interconnect with Jenkins to automatically build and deploy components on ServiceStage, install the Jenkins plug-in and configure Jenkins global parameters.

  • Install the Jenkins plug-in to interconnect with Git and use scripts during build.
  • Configure Jenkins global parameters for the Jenkins pipeline packaging script to interconnect with Git to pull and package code.

Procedure

  1. 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.
  2. Choose Manage Jenkins > Manage Plugins.
  3. Click Available, search for plug-ins in Table 1, and install them.

    Table 1 Plug-in installation description

    Plug-in

    Mandatory

    Description

    Generic Webhook Trigger Plugin

    Yes

    Used to interconnect to the webhook of GitLab.

    GitLab Plugin

    Yes

    Allows GitLab to trigger Jenkins build.

    Pipeline: Basic Steps

    Yes

    Supports pipeline script syntax.

    Pipeline: Build Step

    Yes

    Supports pipeline script syntax.

    Pipeline: Stage Step

    Yes

    Supports pipeline script syntax.

  1. Choose Manage Jenkins > Global Tool Configuration.
  2. Configure Maven.

    Replace /root/app/maven/apache-maven-3.8.6 in the example with the actual Maven installation directory.

  3. Configure JDK.

    Replace /root/app/jdk11/jdk-11.0.8 in the example with the actual JDK installation directory.

  4. Configure Git.

    Replace /usr/bin/git in the example with the actual Git installation directory.