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

Default to Java 11 for jdkVersions #897

Closed
Closed
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
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ buildPlugin(
* `failFast` (default: `true`) - instruct Maven tests to fail fast
* `platforms` (default: `['linux', 'windows']`) - Labels matching platforms to
execute the steps against in parallel
* `jdkVersions` (default: `[8]`) - JDK version numbers, must match a version
* `jdkVersions` (default: `[11]`) - JDK version numbers, must match a version
number jdk tool installed
* `jenkinsVersions`: (default: `[null]`) - a matrix of Jenkins baseline versions to build/test against in parallel (null means default,
only available for Maven projects)
Expand Down
8 changes: 4 additions & 4 deletions test/groovy/BuildPluginStepTests.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class BuildPluginStepTests extends BaseTest {
def configurations = script.getConfigurations([:])

def expected = [
['platform': 'linux', 'jdk': '8', 'jenkins': null],
['platform': 'windows', 'jdk': '8', 'jenkins': null],
['platform': 'linux', 'jdk': '11', 'jenkins': null],
['platform': 'windows', 'jdk': '11', 'jenkins': null],
]
assertEquals(expected, configurations)
printCallStack()
Expand Down Expand Up @@ -142,9 +142,9 @@ class BuildPluginStepTests extends BaseTest {
script.call([useContainerAgent: true])
printCallStack()
// then it runs a stage in a linux container by default
assertTrue(assertMethodCallContainsPattern('node', 'maven'))
assertTrue(assertMethodCallContainsPattern('node', 'maven-11'))
// then it runs a stage in a Windows container by default
assertTrue(assertMethodCallContainsPattern('node', 'maven-windows'))
assertTrue(assertMethodCallContainsPattern('node', 'maven-11-windows'))
assertJobStatusSuccess()
}

Expand Down
2 changes: 1 addition & 1 deletion vars/buildPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ List<Map<String, String>> getConfigurations(Map params) {
}

def platforms = params.containsKey('platforms') ? params.platforms : ['linux', 'windows']
def jdkVersions = params.containsKey('jdkVersions') ? params.jdkVersions : ['8']
def jdkVersions = params.containsKey('jdkVersions') ? params.jdkVersions : ['11']
def jenkinsVersions = params.containsKey('jenkinsVersions') ? params.jenkinsVersions : [null]

def ret = []
Expand Down