Jenkins is an open source software project designed to provide an open and easy-to-use software platform that enables continuous integration of software.
Jenkins is a continuous integration tool developed based on Java to monitor continuous repetitive work, and its functions include:
1. Continuous software version release/testing projects.
2. Monitor the work executed by external calls.
First, make sure that jdk is installed in the system
Official website download address: http://mirrors.jenkins.io/war-stable/latest/jenkins.war
The first method to start: switch to the directory stored in jenkins.war and enter the following command:
java -jar jenkins.war
Then enter localhost:8080 in the browser. localhost can be the IP of the machine or the computer name. The second method to open jenkins is: use tomcat to open it, put the jenkins.war file into the webapps directory under tomcat. When starting jenkins, the jenkins directory will be automatically created in the webapps directory. Therefore, the address you need to enter in the address bar is a bit different from the previous method, enter: localhost:8080/jenkins.
Next, we use the second method to start jenkins.
Start tomcat and browse and enter localhost:8080/jenkins. In Windows environment.
The initial administrator password is automatically generated by jenkins. The password is found according to the red path above and copied to the input box below.
When installing plug-ins, you can install them by default or choose them yourself (you can also install plug-ins after jenkins is configured) Here we select the default one.
After that, we will create a user
After that, enter the homepage of jenkins
"System Management"---->"Global Tool Configuration" Configure jdk, maven and other information
Click "jdk installation" to configure jdk information
Maven configuration
Next we "build a maven project".
Click - "New"
I found no option for "maven" because the Maven Integration plugin is missing
Plugin
Click "System Management" --->Manage Plug-in
The interface appears
Select "Optional Plugin"
After installation, go to "New"
Basic information such as project name
Add svn information. If there is no svn option, it means that the svn plug-in is not installed. Go to install the plug-in. If you have installed the git plugin, there is also a git option.
Click "Add" to fill in the svn account and password
After completion
Add post-build action
Directly package and deploy the built project into tomcat
Add tomcat, which is the deployment project
Of course, tomcat needs to configure the username and password, and the user also needs to have sufficient permissions. Here is the configuration of my tomcat
Configured in tomcat-user.xml
<role rolename="admin" /><role rolename="admin-gui" /><role rolename="manager" /><role rolename="manager-script" /><role rolename="manager-gui" /><user username="admin" password="123456" roles="admin,manager,manager-script,manager-gui,admin-gui"/> Username is admin Password is 123456
You can see your own projects on My Views
After entering the project, click "Build now" to execute the build task. Jenkins will pull the code down from SVN, package it and deploy it to tomcat. All of this is done by Jenkins.
The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.