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

Publish incrementals #255

Merged
merged 13 commits into from Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
@@ -1,6 +1,5 @@
### Maven
target/
plugins-compat-tester-cli/dependency-reduced-pom.xml

### IntelliJ IDEA
.idea/
Expand Down
7 changes: 7 additions & 0 deletions .mvn/extensions.xml
@@ -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.2</version>
</extension>
</extensions>
2 changes: 2 additions & 0 deletions .mvn/maven.config
@@ -0,0 +1,2 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
13 changes: 10 additions & 3 deletions Jenkinsfile
Expand Up @@ -12,6 +12,7 @@ Map branches = [:]

for (int i = 0; i < platforms.size(); ++i) {
String label = platforms[i]
boolean publishing = (label == 'linux')
branches[label] = {
node(label) {
timestamps {
Expand All @@ -21,17 +22,21 @@ for (int i = 0; i < platforms.size(); ++i) {

stage('Build') {
timeout(30) {
infra.runMaven(["clean", "install", "-Dmaven.test.failure.ignore=true"])
def args = ['clean', 'install', '-Dmaven.test.failure.ignore=true']
if (publishing) {
args += '-Dset.changelist'
}
infra.runMaven(args)
}
}

stage('Archive') {
/* Archive the test results */
junit '**/target/surefire-reports/TEST-*.xml'

if (label == 'linux') {
archiveArtifacts artifacts: '**/target/**/*.jar'
if (publishing) {
findbugs pattern: '**/target/findbugsXml.xml'
infra.prepareToPublishIncrementals()
}
}
}
Expand Down Expand Up @@ -191,3 +196,5 @@ disabled_itBranches['CasC tests success'] = {

itBranches.failFast = false
parallel itBranches

infra.maybePublishIncrementals()
6 changes: 3 additions & 3 deletions plugins-compat-tester-cli/pom.xml
Expand Up @@ -4,11 +4,10 @@
<parent>
<groupId>org.jenkins-ci.tests</groupId>
<artifactId>plugins-compat-tester-aggregator</artifactId>
<version>0.5.1-SNAPSHOT</version>
<version>${revision}${changelist}</version>
</parent>

<artifactId>plugins-compat-tester-cli</artifactId>
<version>0.5.1-SNAPSHOT</version>
<name>Plugins compatibility tester CLI</name>
<description>Jenkins Plugin Compatibility Tester (PCT) against latest released version</description>

Expand All @@ -26,6 +25,7 @@
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to work around mojohaus/flatten-maven-plugin#100.

<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.jenkins.tools.test.PluginCompatTesterCli</mainClass>
Expand Down Expand Up @@ -59,7 +59,7 @@
<dependency>
<groupId>org.jenkins-ci.tests</groupId>
<artifactId>plugins-compat-tester</artifactId>
<version>0.5.1-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.beust</groupId>
Expand Down
Expand Up @@ -37,7 +37,7 @@
import org.jenkins.tools.test.model.TestStatus;

/**
* POJO containing CLI arguments & help
* POJO containing CLI arguments &amp; help.
*
* @author Frederic Camblor
*/
Expand Down
3 changes: 1 addition & 2 deletions plugins-compat-tester-model/pom.xml
Expand Up @@ -4,11 +4,10 @@
<parent>
<groupId>org.jenkins-ci.tests</groupId>
<artifactId>plugins-compat-tester-aggregator</artifactId>
<version>0.5.1-SNAPSHOT</version>
<version>${revision}${changelist}</version>
</parent>

<artifactId>plugins-compat-tester-model</artifactId>
<version>0.5.1-SNAPSHOT</version>
<name>Plugins compatibility tester model layer</name>
<description>Jenkins Plugin Compatibility Tester (PCT) model layer</description>

Expand Down
5 changes: 2 additions & 3 deletions plugins-compat-tester/pom.xml
Expand Up @@ -4,11 +4,10 @@
<parent>
<groupId>org.jenkins-ci.tests</groupId>
<artifactId>plugins-compat-tester-aggregator</artifactId>
<version>0.5.1-SNAPSHOT</version>
<version>${revision}${changelist}</version>
</parent>

<artifactId>plugins-compat-tester</artifactId>
<version>0.5.1-SNAPSHOT</version>
<name>Plugins compatibility tester</name>
<description>Jenkins Plugin Compatibility Tester (PCT) against latest released version</description>

Expand All @@ -24,7 +23,7 @@
<dependency>
<groupId>org.jenkins-ci.tests</groupId>
<artifactId>plugins-compat-tester-model</artifactId>
<version>0.5.1-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
Expand Down
Expand Up @@ -32,11 +32,7 @@

import java.io.File;

import org.apache.commons.io.FileUtils;
import org.jenkins.tools.test.model.MavenCoordinates;
import org.jenkins.tools.test.model.PCTPlugin;
import org.jenkins.tools.test.model.PluginCompatReport;
import org.jenkins.tools.test.model.PluginCompatResult;

import java.io.IOException;
import java.nio.file.Paths;
Expand All @@ -53,7 +49,6 @@
import org.codehaus.plexus.PlexusContainerException;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
import org.jenkins.tools.test.exception.PomExecutionException;
import org.jenkins.tools.test.model.MavenBom;
import org.jenkins.tools.test.model.MavenCoordinates;
import org.jenkins.tools.test.model.PluginCompatReport;
import org.jenkins.tools.test.model.PluginCompatResult;
Expand All @@ -63,6 +58,7 @@
import org.jenkins.tools.test.model.TestStatus;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
Expand Down Expand Up @@ -102,6 +98,7 @@ public void tearDown() {
SCMManagerFactory.getInstance().stop();
}

@Ignore("TODO broken by https://github.com/jenkinsci/active-directory-plugin/releases/tag/active-directory-2.17; figure out how to pin a version")
@Test
public void testWithUrl() throws Throwable {
PluginCompatTesterConfig config = getConfig(ImmutableList.of("active-directory"));
Expand Down Expand Up @@ -142,6 +139,7 @@ public void testWithUrl() throws Throwable {
}
}

@Ignore("TODO broken by https://github.com/jenkinsci/active-directory-plugin/releases/tag/active-directory-2.17; figure out how to pin a version")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of Incrementals in jenkinsci/active-directory-plugin#102 seems to have broken these two tests. Anyway no tests here ought to be drawing plugin versions from the update center. (Perhaps we should simply remove this mode and only support -war? I do not know of anyone who actually uses it.)

@Test
public void testWithIsolatedTest() throws Throwable {
PluginCompatTesterConfig config = getConfig(ImmutableList.of("active-directory"));
Expand Down
16 changes: 11 additions & 5 deletions pom.xml
Expand Up @@ -4,24 +4,29 @@
<parent>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
<version>1.54</version>
<version>1.57</version>
<relativePath />
</parent>

<groupId>org.jenkins-ci.tests</groupId>
<artifactId>plugins-compat-tester-aggregator</artifactId>
<version>0.5.1-SNAPSHOT</version>
<version>${revision}${changelist}</version>
<name>Plugins compatibility tester Aggregator</name>
<description>Jenkins Plugin Compatibility Tester (PCT) against latest released version</description>
<url>https://github.com/jenkinsci/plugin-compat-tester</url>
<packaging>pom</packaging>

<scm>
<connection>scm:git:ssh://git@github.com/jenkinsci/plugin-compat-tester.git</connection>
<developerConnection>scm:git:ssh://git@github.com/jenkinsci/plugin-compat-tester.git</developerConnection>
<tag>HEAD</tag>
<connection>scm:git:ssh://git@github.com/${gitHubRepo}.git</connection>
<developerConnection>scm:git:ssh://git@github.com/${gitHubRepo}.git</developerConnection>
<url>https://github.com/${gitHubRepo}</url>
<tag>${scmTag}</tag>
</scm>

<properties>
<revision>0.5.1</revision>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/plugin-compat-tester</gitHubRepo>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<logbackVersion>1.2.3</logbackVersion>
<java.level>8</java.level>
Expand All @@ -31,6 +36,7 @@
<!-- Test libs -->
<powermock.version>1.6.1</powermock.version>
<spotbugs.effort>Max</spotbugs.effort>
<spotbugs.excludeFilterFile>${basedir}/../src/spotbugs/excludeFilter.xml</spotbugs.excludeFilterFile>
</properties>

<modules>
Expand Down
6 changes: 6 additions & 0 deletions src/spotbugs/excludeFilter.xml
@@ -0,0 +1,6 @@
<FindBugsFilter>
<Match>
<!-- Irrelevant for a development tool. -->
<Bug category="SECURITY"/>
</Match>
</FindBugsFilter>