Preparing the Jenkins Environment
Environment Description

If the Jenkins environment has been installed, skip this section.
Install Jenkins on a Linux VM. The following lists the environment information used in this practice. If you use an image for deployment, install Docker on the VM.
- VM: CentOS 7.9
- Jenkins: 2.331
- Git: installed using yum
- JDK: 11.0.8
- Apache Maven: 3.8.6
Note:
-Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION=true
Otherwise, GitLab fails to interconnect with Jenkins. The error is as follows:
HTTP Status 403 - No valid crumb was included in the request
Downloading and Installing Related Software
- Download Jenkins:
- Install Git to pull code for building:
yum install git –y
- Download the JDK installation package:
- Download the Maven installation package:
- Install Docker to pack the image and upload it to the image repository:
yum install docker
Verifying the Installation
- Git
- Git
[root@ecs-jenkins ~]# git version git version 1.8.3.1
- JDK
[root@ecs-jenkins jar]# java -version openjdk version "1.8.0_345" OpenJDK Runtime Environment (build 1.8.0_345-b01) OpenJDK 64-Bit Server VM (build 25.345-b01, mixed mode)
- Maven
[root@ecs-jenkins jar]# mvn -v Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /root/app/maven/apache-maven-3.8.6 Java version: 11.0.8, vendor: Huawei Technologies Co., LTD, runtime: /root/app/jdk11/jdk-11.0.8 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-1160.76.1.el7.x86_64", arch: "amd64", family: "unix"
- Docker
[root@ecs-jenkins jar]# docker version Client: Version: 1.13.1 API version: 1.26 Package version: docker-1.13.1-209.git7d71120.el7.centos.x86_64 Go version: go1.10.3 Git commit: 7d71120/1.13.1 Built: Wed Mar 2 15:25:43 2022 OS/Arch: linux/amd64 Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Package version: docker-1.13.1-209.git7d71120.el7.centos.x86_64 Go version: go1.10.3 Git commit: 7d71120/1.13.1 Built: Wed Mar 2 15:25:43 2022 OS/Arch: linux/amd64 Experimental: false
Figure 1 Version check - Git
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