Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable deployment of Incremental releases #131

Merged
merged 3 commits into from
May 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>git-changelist-maven-extension</artifactId>
<version>1.0-beta-7</version>
</extension>
</extensions>
2 changes: 2 additions & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
38 changes: 17 additions & 21 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '20'))
timeout(time: 1, unit: 'HOURS')
}
agent {
docker {
image 'maven:3.5.0-jdk-8'
label 'docker'
}
}
stages {
stage('main') {
// TODO Windows build in parallel
steps {
sh 'mvn -B clean verify'
}
post {
success {
junit '**/target/surefire-reports/TEST-*.xml'
}
properties([buildDiscarder(logRotator(numToKeepStr: '20'))])
node('docker') {
timeout(time: 1, unit: 'HOURS') {
deleteDir()
checkout scm
def tmp = pwd tmp: true
// TODO or can do explicitly something like: docker run -v "$TMP"/m2repo:/var/maven/.m2/repository --rm -u $(id -u):$(id -g) -e MAVEN_CONFIG=/var/maven/.m2 -v "$PWD":/usr/src/mymaven -w /usr/src/mymaven maven:3.6.1-jdk-8 mvn -Duser.home=/var/maven …
docker.image('maven:3.6.1-jdk-8').inside {
withEnv(["TMP=$tmp"]) {
// TODO Azure mirror
sh 'mvn -B -Dmaven.repo.local="$TMP"/m2repo -ntp -e -Dset.changelist -Dexpression=changelist -Doutput="$TMP"/changelist -Dmaven.test.failure.ignore help:evaluate clean install'
}
}
junit '**/target/surefire-reports/TEST-*.xml'
def changelist = readFile("$tmp/changelist")
dir("$tmp/m2repo") {
archiveArtifacts "**/*$changelist/*$changelist*"
}
}
}
infra.maybePublishIncrementals()
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ THE SOFTWARE.

<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>2.50-SNAPSHOT</version>
<version>${revision}${changelist}</version>

<name>Test harness for Jenkins and plugins</name>
<description>Harness used to run functional tests of Jenkins core and plugins.</description>
Expand All @@ -43,10 +43,12 @@ THE SOFTWARE.
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}.git</connection>
<developerConnection>scm:git:ssh://git@github.com/jenkinsci/${project.artifactId}.git</developerConnection>
<url>https://github.com/jenkinsci/${project.artifactId}</url>
<tag>HEAD</tag>
<tag>${scmTag}</tag>
</scm>

<properties>
<revision>2.50</revision>
<changelist>-SNAPSHOT</changelist>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty.version>9.4.5.v20170502</jetty.version>
<java.level>8</java.level>
Expand Down