Verified Commit f73bf7a0 authored by Johannes Visintini's avatar Johannes Visintini
Browse files

update ohsome parent to 2.8

parent 492e1d34
......@@ -3,12 +3,12 @@
<component name="CheckStyle-IDEA">
<option name="configuration">
<map>
<entry key="active-configuration" value="HTTP_URL:https://gitlab.gistools.geog.uni-heidelberg.de/giscience/big-data/ohsome/parent/raw/2.2/ohsome-codestyle/src/main/resources/checkstyle-google-ohsome.xml:ohsome Google Checks" />
<entry key="checkstyle-version" value="8.29" />
<entry key="active-configuration" value="HTTP_URL:https://gitlab.gistools.geog.uni-heidelberg.de/giscience/big-data/ohsome/parent/raw/2.8/ohsome-codestyle/src/main/resources/checkstyle-google-ohsome.xml:ohsome Google Checks" />
<entry key="checkstyle-version" value="8.35" />
<entry key="copy-libs" value="false" />
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
<entry key="location-2" value="HTTP_URL:https://gitlab.gistools.geog.uni-heidelberg.de/giscience/big-data/ohsome/parent/raw/2.2/ohsome-codestyle/src/main/resources/checkstyle-google-ohsome.xml:ohsome Google Checks" />
<entry key="location-2" value="HTTP_URL:https://gitlab.gistools.geog.uni-heidelberg.de/giscience/big-data/ohsome/parent/raw/2.8/ohsome-codestyle/src/main/resources/checkstyle-google-ohsome.xml:ohsome Google Checks" />
<entry key="property-2.org.checkstyle.google.suppressionfilter.config" value="" />
<entry key="property-2.org.checkstyle.google.suppressionxpathfilter.config" value="" />
<entry key="scan-before-checkin" value="false" />
......
......@@ -44,7 +44,7 @@ pipeline {
rtMaven.deployer.deployArtifacts = false
withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile javadoc:jar source:jar install -P sign,git,withDep -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS -Dgpg.passphrase=$PASSPHRASE'
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile javadoc:jar source:jar verify -P jacoco,sign,git -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS -Dgpg.passphrase=$PASSPHRASE'
}
}
}
......@@ -55,6 +55,48 @@ pipeline {
}
}
stage ('Reports and Statistics') {
steps {
script {
report_basedir = "/srv/reports/${REPO_NAME}/${VERSION}_${env.BRANCH_NAME}/${env.BUILD_NUMBER}_${LATEST_COMMIT_ID}"
// jacoco
report_dir = report_basedir + "/jacoco/"
jacoco(
execPattern : '**/target/jacoco.exec',
classPattern : '**/target/classes',
sourcePattern : '**/src/main/java',
inclusionPattern : '/org/heigit/**'
)
sh "mkdir -p ${report_dir} && rm -Rf ${report_dir}* && find . -path '*/target/site/jacoco' -exec cp -R --parents {} ${report_dir} \\; && find ${report_dir} -path '*/target/site/jacoco' | while read line; do echo \$line; neu=\${line/target\\/site\\/jacoco/} ; mv \$line/* \$neu ; done && find ${report_dir} -type d -empty -delete"
// infer
if (env.BRANCH_NAME ==~ INFER_BRANCH_REGEX) {
report_dir = report_basedir + "/infer/"
sh "mvn clean"
sh "infer run --pmd-xml -r -- mvn compile"
sh "mkdir -p ${report_dir} && rm -Rf ${report_dir}* && cp -R ./infer-out/* ${report_dir}"
}
// warnings plugin
rtMaven.run pom: 'pom.xml', goals: '--batch-mode -V -e clean compile checkstyle:checkstyle pmd:pmd pmd:cpd com.github.spotbugs:spotbugs-maven-plugin:3.1.7:spotbugs -Dmaven.repo.local=.m2'
recordIssues enabledForFailure: true, tools: [mavenConsole(), java(), javaDoc()]
recordIssues enabledForFailure: true, tool: checkStyle()
recordIssues enabledForFailure: true, tool: spotBugs()
recordIssues enabledForFailure: true, tool: cpd(pattern: '**/target/cpd.xml')
recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/target/pmd.xml')
recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/infer-out/report.xml', id: 'infer')
}
}
post {
failure {
rocketSend channel: 'jenkinsohsome', emoji: ':disappointed:', message: "Reporting of *${REPO_NAME}*-build nr. ${env.BUILD_NUMBER} *failed* on Branch - ${env.BRANCH_NAME} (<${env.BUILD_URL}|Open Build in Jenkins>). Latest commit from ${LATEST_AUTHOR}." , rawMessage: true
}
}
}
stage ('Deploy Snapshot') {
when {
expression {
......@@ -63,6 +105,9 @@ pipeline {
}
steps {
script {
withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile javadoc:jar source:jar install -P sign,git -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
rtMaven.deployer.deployArtifacts buildInfo
server.publishBuildInfo buildInfo
SNAPSHOT_DEPLOY = true
......@@ -83,6 +128,9 @@ pipeline {
}
steps {
script {
withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile javadoc:jar source:jar install -P sign,git -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
rtMaven.deployer.deployArtifacts buildInfo
server.publishBuildInfo buildInfo
RELEASE_DEPLOY = true
......@@ -91,8 +139,7 @@ pipeline {
file(credentialsId: 'ossrh-settings', variable: 'settingsFile'),
string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')
]) {
// copy of the above build, since "deploy" does rebuild the packages, without withDep profile
sh 'mvn -s $settingsFile javadoc:jar source:jar deploy -P sign,git,deploy-central -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
sh 'mvn clean compile -s $settingsFile javadoc:jar source:jar deploy -P sign,git,deploy-central -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
}
post {
......@@ -130,49 +177,6 @@ pipeline {
}
}
stage ('Reports and Statistics') {
steps {
script {
report_basedir = "/srv/reports/${REPO_NAME}/${VERSION}_${env.BRANCH_NAME}/${env.BUILD_NUMBER}_${LATEST_COMMIT_ID}"
// jacoco
report_dir = report_basedir + "/jacoco/"
rtMaven.run pom: 'pom.xml', goals: 'clean verify -Pjacoco -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS'
jacoco(
execPattern : '**/target/jacoco.exec',
classPattern : '**/target/classes',
sourcePattern : '**/src/main/java',
inclusionPattern : '/org/heigit/**'
)
sh "mkdir -p ${report_dir} && rm -Rf ${report_dir}* && find . -path '*/target/site/jacoco' -exec cp -R --parents {} ${report_dir} \\; && find ${report_dir} -path '*/target/site/jacoco' | while read line; do echo \$line; neu=\${line/target\\/site\\/jacoco/} ; mv \$line/* \$neu ; done && find ${report_dir} -type d -empty -delete"
// infer
if (env.BRANCH_NAME ==~ INFER_BRANCH_REGEX) {
report_dir = report_basedir + "/infer/"
sh "mvn clean"
sh "infer run --pmd-xml -r -- mvn compile"
sh "mkdir -p ${report_dir} && rm -Rf ${report_dir}* && cp -R ./infer-out/* ${report_dir}"
}
// warnings plugin
rtMaven.run pom: 'pom.xml', goals: '--batch-mode -V -e compile checkstyle:checkstyle pmd:pmd pmd:cpd com.github.spotbugs:spotbugs-maven-plugin:3.1.7:spotbugs -Dmaven.repo.local=.m2'
recordIssues enabledForFailure: true, tools: [mavenConsole(), java(), javaDoc()]
recordIssues enabledForFailure: true, tool: checkStyle()
recordIssues enabledForFailure: true, tool: spotBugs()
recordIssues enabledForFailure: true, tool: cpd(pattern: '**/target/cpd.xml')
recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/target/pmd.xml')
recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/infer-out/report.xml', id: 'infer')
}
}
post {
failure {
rocketSend channel: 'jenkinsohsome', emoji: ':disappointed:', message: "Reporting of *${REPO_NAME}*-build nr. ${env.BUILD_NUMBER} *failed* on Branch - ${env.BRANCH_NAME} (<${env.BUILD_URL}|Open Build in Jenkins>). Latest commit from ${LATEST_AUTHOR}." , rawMessage: true
}
}
}
stage ('Check Dependencies') {
when {
expression {
......@@ -208,7 +212,7 @@ pipeline {
echo date_pre.format( 'yyyyMMdd' )
date_now = new Date(currentBuild.rawBuild.getStartTimeInMillis()).clearTime()
echo date_now.format( 'yyyyMMdd' )
return date_pre.numberAwareCompareTo(date_now)<0
return date_pre.numberAwareCompareTo(date_now) < 0
}
return false
}
......
......@@ -11,7 +11,7 @@
<parent>
<groupId>org.heigit.ohsome</groupId>
<artifactId>ohsome-parent</artifactId>
<version>2.5</version>
<version>2.8</version>
</parent>
<dependencies>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment