Skip to content

Commit

Permalink
Add Java 11 and 17 to build/test matrix (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Mar 12, 2022
1 parent ff6cc79 commit f3eb5fb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
node('maven') {
checkout scm
sh 'mvn -B -ntp -Dset.changelist clean install'
infra.prepareToPublishIncrementals()
}
infra.maybePublishIncrementals()
/*
* While this is not a plugin, it is much simpler to reuse the pipeline code for CI. This allows for
* easy Linux/Windows testing and produces incrementals. The only feature that relates to plugins is
* allowing one to test against multiple Jenkins versions.
*/
buildPlugin(useContainerAgent: true, configurations: [
[ platform: 'linux', jdk: '8' ],
[ platform: 'linux', jdk: '11' ],
[ platform: 'windows', jdk: '11' ],
[ platform: 'linux', jdk: '17' ],
])
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<repositories>
Expand Down
14 changes: 14 additions & 0 deletions src/test/java/jenkins/Junit4TestsRanTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package jenkins;

import org.junit.Test;

public class Junit4TestsRanTest {

@Test
public void anything() {
/*
* Intentionally blank. We just want a test that runs with JUnit so that buildPlugin() works
* in the Jenkinsfile.
*/
}
}

0 comments on commit f3eb5fb

Please sign in to comment.