blob: f5b1ad8db20b64b4818581cc60c8f52197452ab6 [file] [log] [blame]
pipeline {
agent any
tools {
maven 'apache-maven-latest'
jdk 'jdk1.8.0-latest'
}
stages {
stage ('prepare') {
steps {
cleanWs()
checkout scm
}
}
stage ('build') {
steps {
sh 'mvn -version'
sh 'java -version'
sh 'mvn -f dev/pom.xml -B clean install site -DskipTests'
}
}
stage ('test') {
steps {
sh 'mvn -version'
sh 'java -version'
sh 'mvn -f dev/pom.xml -B test -Dcheckstyle.skip=true -Dfindbugs.skip=true -Dpmd.skip=true'
}
}
stage("Publish Checkstyle & PMD & Findbugs Results"){
steps {
//checkstyle canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '**/checkstyle-result*.xml', unHealthy: '', unstableTotalAll:'0'
//pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '**/target/pmd.xml', unHealthy: ''
findbugs canComputeNew: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', pattern: '**/findbugsXml.xml', unHealthy: ''
}
}
stage ('deploy snapshot') {
when {
branch 'develop'
}
steps {
sh 'mvn -f dev/pom.xml -B deploy -DskipTests -Dcheckstyle.skip=true -Dfindbugs.skip=true -Dpmd.skip=true -DaltDeploymentRepository=repo.eclipse.org::default::https://repo.eclipse.org/content/repositories/openk-platform-snapshots/'
}
}
stage ('deploy release') {
when {
branch 'master'
}
steps {
sh 'mvn -f dev/pom.xml -B deploy -DskipTests -Dcheckstyle.skip=true -Dfindbugs.skip=true -Dpmd.skip=true -DaltDeploymentRepository=repo.eclipse.org::default::https://repo.eclipse.org/content/repositories/openk-platform-release/'
}
}
}
}