Jenkins Continuous Integration 3

Source: Internet
Author: User

1. Install the pipeline plug-in and first recognize
    • 1. Start Jenkins, open browser http://localhost:8080, system administration, user name: chenshanju/123456
    • 2. System Management-plug-in management, install pipeline plugin

    • 3. Configuring the MAVEN Environment
      System Management-Global tool configuration.
      If MAVEN is not installed on this machine and the name is set to M3, select Install Maven
      If MAVEN is installed on this machine, the name is set to M3, and the MAVEN installation path is filled in
    • 4. Create the pipeline project and build it.
//pipeline script脚本node {   def mvnHome   stage(‘Preparation‘) { // for display purposes      // Get some code from a GitHub repository      //guan fang官方      //git ‘https://github.com/jglick/simple-maven-project-with-tests.git‘      git ‘https://github.com/nbbull/demoProject.git‘      // Get the Maven tool.      // ** NOTE: This ‘M3‘ Maven tool must be configured      // **       in the global configuration.                 mvnHome = tool ‘M3‘   }   stage(‘Build‘) {      // Run the maven build      if (isUnix()) {         sh "‘${mvnHome}/bin/mvn‘ -Dmaven.test.failure.ignore clean package"      } else {         bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean package/)      }   }   stage(‘Results‘) {      junit ‘**/target/surefire-reports/TEST-*.xml‘      archive ‘target/*.jar‘   }}

Jenkins Continuous Integration 3

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.