Linux Deployment Jenkins

Source: Internet
Author: User

1. Install JDK, configure JDK path, Python path

(Current user's profile) Vi. Bash_profile

Export java_home= $HOME/local/jdk1.8. 0_111export tomcat_home= $HOME/local/apache-tomcat-7.0.72PATH = $HOME/local/apache-ant-1.9.7/bin: $JAVA _home/bin: $HOME/local/python/bin: $HOME/local/mysql-5.1.58/bin:$ PATH: $HOME/Binld_library_path= $JAVA _home/lib: $HOME/local/python/lib:export CLASSPATH=.: $JAVA _ Home/lib/dt.jar: $JAVA _home/lib/tools.jarexport pathexport ld_library_path

2. Install Tomcat, if not the root user, enter the Tomcat/bin directory and modify the Sh file permissions

chmod 777 *.sh

3. Install Jenkins to put Jenkins.war into the Tomcat/webapps directory, and also because Jenkins is only used internally, modify the login security restrictions

VI. jenkins/config.xml

<?XML version= ' 1.0 ' encoding= ' UTF-8 '?><Hudson>  <disabledadministrativemonitors/>  <version>1.609.3</version>  <numexecutors>3</numexecutors>  <Mode>NORMAL</Mode>  <usesecurity>True</usesecurity>  <Authorizationstrategyclass= "Hudson.security.authorizationstrategy$unsecured"/>  <Securityrealmclass= "Hudson.security.securityrealm$none"/>  <Disablerememberme>False</Disablerememberme>  <Projectnamingstrategyclass= "Jenkins.model.projectnamingstrategy$defaultprojectnamingstrategy"/>  <Workspacedir>${item_rootdir}/workspace</Workspacedir>  <Buildsdir>${item_rootdir}/builds</Buildsdir>  <JDKs/>  <Viewstabbarclass= "Hudson.views.DefaultViewsTabBar"/>  <Myviewstabbarclass= "Hudson.views.DefaultMyViewsTabBar"/>  <Clouds/>  <Quietperiod>5</Quietperiod>  <Scmcheckoutretrycount>0</Scmcheckoutretrycount>  < views>    <Hudson.model.AllView>      <ownerclass= "Hudson"Reference=".. /.. /.."/>      <name>All</name>      <filterexecutors>False</filterexecutors>      <Filterqueue>False</Filterqueue>      <Propertiesclass= "Hudson.model.view$propertylist"/>    </Hudson.model.AllView>  </ views>  <Primaryview>All</Primaryview>  <Slaveagentport>0</Slaveagentport>  <label></label>  <nodeproperties/>  <globalnodeproperties/></Hudson>

4. Launch Tomcat to access Jenkins

Enter Tomcat/bin directory, execute SH startup.sh, start complete

Access Host/jenkins

Then you can create an Automation project.

Build: Execute Shell

SOURCE ~/.bash_profile
Cd/home/user/local/testcase
Pybot-l debug-d/home/user/local/testcase/case1

Post-Build actions:

......

Pit Record:

My automation project was written with the robot framework, and the results report was opened on Jenkins, prompting:

Opening Robot Framework Report failed

After tossing and turning, give up Tomcat and start Jenkins directly to solve:

Background start Jenkins:

Nohup java-dhudson.model.directorybrowsersupport.csp=-jar./jenkins.war &

The re-access report is OK.

Linux Deployment Jenkins

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.