Jenkins features include:
1. Continuous software release/test projects. 2. Monitor the work performed by external calls.Copy the code
Activation:
Make sure you have JDK installed on your system, preferably at least JDK1.5. War: $Java -jar Jenkins. war: $Java -jar Jenkins. war: $Java -jar Jenkins. war: $java-jar Jenkins. War --httpPort=8081 Then type localhost:8081 in your browser (firefox is recommended). Localhost can be the local IP address or the computer name. You can open Jenkins up. The second method is to open tomcat and unzip tomcat to a directory such as /usr/localWar file into the webapps directory under Tomcat. When tomcat is started, the Jenkins directory will be automatically established under the webapps directory. You need to type localhost:8080/ Jenkins in the address bar.Copy the code
IO /war-stable/…
Download it and run it, type in the url, it’ll keep us waiting
Our original administrator password can be found in the red text or by launching Jenkins’ console
And then this page came up, and I googled it and said it was a Jenkins bug,
To solve this problem, enter http://: in the browser. Do not access the “/ Jenkins “path. It worked… I wonder if it will still be a problem if I start it in Tomcat? !!!!!
Select the installation mode, select the first one, click, enter the following interface
After installing various plugins, I don’t know why many of them failed to be installed. It seems that we can install them separately later
When you’re done, log in to the home page
The plugins installed by default above are not enough
Click System Management -> Plug-in Management -> Optional Plug-ins -> Filter search box to find the following plug-ins:
Maven Integration plugin
SSH plugin
Deploy to container Plugin
GitLab
Gitlab Hook
Copy the code
Let’s configure our common tools
JDK, cancel the online installation, configure the local JDK
Maven
Git
Create a new Maven project in Jenkins, for details
Windows batch processing command:
<! Stop the command script for the specified port --> @echo off
setlocal enabledelayedexpansion
set port=11001
for /f "tokens=1-5" %%a in ('netstat -ano ^| find ":%port%"') do (
if "%%e%"= ="" (
set pid=%%d
) else (
set pid=%%e
)
echo! pid! )if NOT ! "" pid!"= =""( taskkill /f /pid ! pid! ) <! Clean package -dskiptests -u <! -- Project startup command (background run) --> @echo off
setBUILD_ID=dontKillMe start javaw-jar.\target\demo-0.0.1- snapshot.jarexit
Copy the code
Starting with Javaw-JAR allows projects to be executed in the background
After this save, the project is created and you can click Build
We can click on build Status in the lower left corner to see the output from the console
This usually starts normally