diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml new file mode 100644 index 0000000..9ac2968 --- /dev/null +++ b/.mvn/extensions.xml @@ -0,0 +1,7 @@ + + + io.jenkins.tools.incrementals + git-changelist-maven-extension + 1.4 + + diff --git a/.mvn/maven.config b/.mvn/maven.config new file mode 100644 index 0000000..2c02395 --- /dev/null +++ b/.mvn/maven.config @@ -0,0 +1,2 @@ +-Pconsume-incrementals +-Pmight-produce-incrementals-with-minimal-flattening diff --git a/Jenkinsfile b/Jenkinsfile index 4f8598c..d92d763 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,26 +1,24 @@ -#!/usr/bin/env groovy +properties([ + buildDiscarder(logRotator(numToKeepStr: '10')), + disableConcurrentBuilds(abortPrevious: true) +]) -/* Only keep the 10 most recent builds. */ -properties([[$class: 'BuildDiscarderProperty', - strategy: [$class: 'LogRotator', numToKeepStr: '10']]]) +node('maven-11') { + stage('Checkout') { + infra.checkoutSCM() + } - -node('java') { - timestamps { - stage('Checkout') { - checkout scm - } - - stage('Build') { - withEnv([ - "JAVA_HOME=${tool 'jdk11'}", - "PATH+MVN=${tool 'mvn'}/bin", - 'PATH+JDK=$JAVA_HOME/bin', - ]) { - timeout(30) { - sh 'mvn clean install versions:display-plugin-updates' - } - } - } + stage('Build') { + timeout(time: 30, unit: 'MINUTES') { + def mavenOptions = [ + '-Dset.changelist', + 'clean', + 'install', + ] + infra.runMaven(mavenOptions, 11) + infra.prepareToPublishIncrementals() } + } } + +infra.maybePublishIncrementals() diff --git a/pom.xml b/pom.xml index 245986f..c8c374d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci jenkins - 1.93-SNAPSHOT + ${revision}${changelist} pom Jenkins Parent POM @@ -44,10 +44,10 @@ - scm:git:https://github.com/jenkinsci/pom.git - scm:git:git@github.com:jenkinsci/pom.git - HEAD - https://github.com/jenkinsci/pom + scm:git:https://github.com/${gitHubRepo}.git + scm:git:git@github.com:${gitHubRepo}.git + ${scmTag} + https://github.com/${gitHubRepo} @@ -73,6 +73,9 @@ + 1.91 + -SNAPSHOT + jenkinsci/pom interval:10080 @@ -921,6 +924,100 @@ + + + might-produce-incrementals-with-minimal-flattening + + + + org.codehaus.mojo + flatten-maven-plugin + 1.3.0 + + true + + + + flatten + + flatten + + process-resources + + true + + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + keep + interpolate + interpolate + interpolate + + ${project.build.directory} + ${project.artifactId}-${project.version}.pom + + + + + + maven-enforcer-plugin + + + io.jenkins.tools.incrementals + incrementals-enforcer-rules + ${incrementals-plugin.version} + + + + + display-info + + + + [${incrementals-enforce-minimum.version},) + + + + + + + + maven-release-plugin + + incrementals:reincrementalify + + + + + produce-incrementals