2018-04-22Jenkins+maven+svn environment construction learning experience


Build tomcat environment --> install svn management code --> jenkins add maven plugin --> new maven project --> configuration (source management/build/build trigger) --> build

78 jenkins
environment build and
download war package; jenkins.war
execute java-jar jenkins.war or deploy to tomcat
to visit http://localhost:8080 to
download tomcat, apache-tomcat-6.0.53

Step
1. jenkins.war is placed in apache- Below the tomcat-6.0.53\webapps folder
2. Start tomcat, open the web page at http://localhost:8080/
3. Start jenkins
apache-tomcat-6.0.53\bin\startup, double-click
4. Enter the web page address http: //localhost:8080/jenkins/
5. Find the local file C:\Users\lenovo\.jenkins\secrets\initialAdminPassword and
copy the password to the web page to enter the password, continue to the page jump
6. Select the recommended download on the left, install suggested plugins
7. Wait for the installation to complete, enter the account password admin/admin, enter the jenkins page
8. Enter the system management - system settings, you can set some configurations, change the email address here

9. Build the svn server, VisualSVN-Server-3.5.1-x64, all the way Installation is complete
10. Create a file directory and copy the address https://LENOVO-PC/svn/zhou
11. Create an svn user, test/test
12. Install the svn client, add the application menu to the settingt
13. Upload the code to svn,
and then import the code in eclipse import-exisiting maven projects


14. Jenkins adds the maven plugin
maven integration plugin
15. Create a new project, select Subversion for source code management, and
fill in the project svn Path, https://lenovo-pc/svn/zhou
Fill in the account password, test/test
bulid, add maven path
Add jdk path
Goals and options Fill in the clean test command, save the completed project configuration
Build trigger
Build periodically, compile at intervals Once, no matter whether the code changes or not, Poll SCM compares
it every once in a while. If there is a change, build it, otherwise don't build

it set Java_TOOL_OPTIONS="-Dfile.encoding=UTF8" 18. In the workspace, the tasks corresponding to jenkins will be saved in the workspace C:\Users\lenovo\.jenkins\workspace 19. Modify the path of the test report of the mail to httpd.exe eclipse report address








备注:时间表达式由5部分组成
分钟 时钟 日 月 周
# every fifteen minutes (perhaps at :07, :22, :37, :52)
H/15 * * * *
# every ten minutes in the first half of every hour (three times, perhaps at :04, :14, :24)
H(0-29)/10 * * * *
# once every two hours at 45 minutes past the hour starting at 9:45 AM and finishing at 3:45 PM every weekday.
45 9-16/2 * * 1-5
# once in every two hours slot between 9 AM and 5 PM every weekday (perhaps at 10:38 AM, 12:38 PM, 2:38 PM, 4:38 PM)
H H(9-16)/2 * * 1-5
# once a day on the 1st and 15th of every month except December
H H 1,15 1-11 *

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324612624&siteId=291194637