All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.codingstyle.4.10.0.source-code.Jenkinsfile.coverage Maven / Gradle / Ivy

node('java11-agent') {
    stage ('Checkout') {
        checkout scm
    }

    stage ('Git mining') {
        discoverGitReferenceBuild()
        mineRepository()
    }

    stage ('Build, Test, and Static Analysis') {
        withMaven(mavenLocalRepo: '/var/data/m2repository', mavenOpts: '-Xmx768m -Xms512m') {
            sh 'mvn -V -e clean verify -Dmaven.test.failure.ignore -Dgpg.skip'
        }

        recordIssues tools: [java(), javaDoc()], aggregatingResults: 'true', id: 'java', name: 'Java'
        recordIssues tool: errorProne(), healthy: 1, unhealthy: 20

        junit testResults: '**/target/*-reports/TEST-*.xml'
        recordCoverage tools: [[parser: 'JACOCO']], sourceCodeRetention: 'EVERY_BUILD'

        recordIssues tools: [checkStyle(pattern: 'target/checkstyle-result.xml'),
            spotBugs(pattern: 'target/spotbugsXml.xml'),
            pmdParser(pattern: 'target/pmd.xml'),
            cpd(pattern: 'target/cpd.xml'),
            taskScanner(highTags:'FIXME', normalTags:'TODO', includePattern: '**/*.java', excludePattern: 'target/**/*')],
            qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]
    }

    stage ('Collect Maven Warnings') {
        recordIssues tool: mavenConsole()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy