1. Enter the system management for configuration

1.1 Plug-in Management

Check that Publish Over SSH and Deploy to Container (Plugin) and the Gitee plug-in are installed.

First point installed, in the search bar search, I installed here can be installed here to search out



If you don’t find it and need to install it, then click on the optional plugins, search for download, and restart Jenkins once you have downloaded it

1.2 System Settings

Enter JenkinSurl, IP: port number, and administrator email address (optional)



Enter the Gitee link name (arbitrarily written) and the Gitee link, and select the certificate token. There is no need to add it the first time



Add a certificate, type select API token, and then enter the token if not obtained herehttps://gitee.com/profile/per…, click Add and select, and click Test in the lower right corner to test





Enter the remote server password, server name (optional), server IP, login server user name, upload code root directory, etc., click save to return to the home page



Set SSH Server and input Name, IP and other information, where IP is the public network IP of the server, user name is the account name used when logging in the instance, and the address where the source code is stored is the storage path. You can find the path of the uploaded source code in Linux, and you can set the path by yourself (if there is any, it will automatically create a new one).

1.3 Global security configuration

If there is a startup security option must be checked, security domain allows users to register, authorization policy check anyone available, click save to return to the home page



1.4 Global tool configuration

Configure Maven, JDK, Git, and other paths, and click Save to return to the home page





2. Deploy

2.1 New Task

Click the new task on the left to create a new task for the project



Enter a name and select the first freestyle item

Basic configuration

The default can be

Source code management

Select Git, fill in the URL, and select the Jenkins token, similar to 1.2



If it fails to connect, please click Add -Jenkins on the next line. The first setting needs to be added





Select “Username with Password” and fill in the username and password of Gitee. The ID can be left unfilled. After filling in the ID, drop down to add it

Build the trigger (optional)

Tick to trigger a remote build and arbitrarily enter an identity token



For example, the callback address abovehttp://IP: port number /job/test/build? token=token_tv

As soon as this address is executed (the change is accessed in the browser), the project initiates a build project, a pull code package deployment operation

Build environment

The environment does not need to be built for now

build

Add, select Invoke top-level Maven Targets, select the Maven version, and fill in Clean Install for the target

Post-build operation

Select the



When you are finished, click Save to return

Build the project

Click “Build Now”, there will be tasks and progress bar below. You can click “Task” to enter details, and click “Console Output” to see if there is any success or error



Click the console output, you can see the operation process, success is successful