Newer
Older
mocking / Jenkinsfile
pipeline {

    agent any

    tools {
        maven   'MAVEN-3.0'
        jdk     'JDK8'
    }

    stages {

        stage ('準備') {
            steps {
                checkout scm
            }
        }

        stage ('ビルド') {
            steps {
                withEnv(['MAVEN_OPTS=-Xmx512m']) {
                    sh "mvn -Dmaven.test.failure.ignore clean install"
                }
            }
        }

        stage ('解析') {
            steps {
                junit '**/target/surefire-reports/TEST-*.xml'
            }
        }

    }

    post {
        success {
            archiveArtifacts artifacts: "**/target/*.jar, **/target/*.zip"
        }
    }
}