Skip to content
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
6 changes: 4 additions & 2 deletions .test-infra/jenkins/common_job_properties.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class common_job_properties {
// Sets common top-level job properties for main repository jobs.
static void setTopLevelMainJobProperties(context,
String branch = 'master',
String jdkVersion = 'JDK 1.8 (latest)',
int timeout = 100,
String jenkinsExecutorLabel = 'ubuntu') {
// GitHub project.
Expand All @@ -63,9 +64,10 @@ class common_job_properties {
String scmUrl,
String defaultBranch,
String jenkinsExecutorLabel,
int defaultTimeout) {
int defaultTimeout,
String jdkVersion = 'JDK 1.8 (latest)') {
// Set JDK version.
context.jdk('JDK 1.8 (latest)')
context.jdk(jdkVersion)

// Restrict this project to run only on Jenkins executors as specified
context.label(jenkinsExecutorLabel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,13 @@

import common_job_properties

// This job runs the Java postcommit tests cross multiple JDK versions.
matrixJob('bookkeeper_postcommit_master_jdkversions') {
description('Runs nightly build for bookkeeper in multiple Jdk versions.')
// This job runs the Java postcommit tests on Java 8
mavenJob('bookkeeper_postcommit_master_java8') {
description('Runs nightly build for bookkeeper in Java 8.')

// Set common parameters.
common_job_properties.setTopLevelMainJobProperties(delegate)

// Set JDK versions.
axes {
label('label', 'ubuntu')
jdk('JDK 1.8 (latest)',
'JDK 1.9 (latest)')
}
common_job_properties.setTopLevelMainJobProperties(
delegate, 'master', 'JDK 1.8 (latest)')

// Sets that this is a PostCommit job.
common_job_properties.setPostCommit(
Expand All @@ -41,17 +35,12 @@ matrixJob('bookkeeper_postcommit_master_jdkversions') {
// Allows triggering this build against pull requests.
common_job_properties.enablePhraseTriggeringFromPullRequest(
delegate,
'JDK Version Test',
'/test-jdks')
'Java 8 Test',
'/test-java8')

// Maven build for this job.
steps {
maven {
// Set maven parameters.
common_job_properties.setMavenConfig(delegate)
// Set maven parameters.
common_job_properties.setMavenConfig(delegate)

// Maven build project.
goals('clean apache-rat:check package spotbugs:check')
}
}
// Maven build project.
goals('clean apache-rat:check package spotbugs:check')
}
46 changes: 46 additions & 0 deletions .test-infra/jenkins/job_bookkeeper_postcommit_master_java9.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import common_job_properties

// This job runs the Java postcommit tests on Java 9
mavenJob('bookkeeper_postcommit_master_java9') {
description('Runs nightly build for bookkeeper in Java 9.')

// Set common parameters.
common_job_properties.setTopLevelMainJobProperties(
delegate, 'master', 'JDK 1.9 (latest)')

// Sets that this is a PostCommit job.
common_job_properties.setPostCommit(
delegate,
'H 12 * * *',
false)

// Allows triggering this build against pull requests.
common_job_properties.enablePhraseTriggeringFromPullRequest(
delegate,
'Java 9 Test',
'/test-java9')

// Set maven parameters.
common_job_properties.setMavenConfig(delegate)

// Maven build project.
goals('clean apache-rat:check package spotbugs:check')
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import common_job_properties

// This is the Java precommit which runs a maven install, and the current set of precommit tests.
matrixJob('bookkeeper_precommit_pullrequest') {
description('precommit verification for pull requests of <a href="http://bookkeeper.apache.org">Apache BookKeeper</a>.')
mavenJob('bookkeeper_precommit_pullrequest_java8') {
description('precommit verification for pull requests of <a href="http://bookkeeper.apache.org">Apache BookKeeper</a> in Java 8.')

// Execute concurrent builds if necessary.
concurrentBuild()
Expand All @@ -29,26 +29,15 @@ matrixJob('bookkeeper_precommit_pullrequest') {
common_job_properties.setTopLevelMainJobProperties(
delegate,
'master',
'JDK 1.8 (latest)',
120)

// Set JDK versions.
axes {
label('label', 'ubuntu')
jdk('JDK 1.8 (latest)',
'JDK 1.9 (latest)')
}

// Sets that this is a PreCommit job.
common_job_properties.setPreCommit(delegate, 'Maven clean install')
common_job_properties.setPreCommit(delegate, 'Maven clean install (Java 8)')

// Maven build for this job.
steps {
maven {
// Set Maven parameters.
common_job_properties.setMavenConfig(delegate)
// Set Maven parameters.
common_job_properties.setMavenConfig(delegate)

// Maven build project
goals('clean apache-rat:check package spotbugs:check')
}
}
// Maven build project
goals('clean apache-rat:check package spotbugs:check')
}
43 changes: 43 additions & 0 deletions .test-infra/jenkins/job_bookkeeper_precommit_java9.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import common_job_properties

// This is the Java precommit which runs a maven install, and the current set of precommit tests.
mavenJob('bookkeeper_precommit_pullrequest_java9') {
description('precommit verification for pull requests of <a href="http://bookkeeper.apache.org">Apache BookKeeper</a> in Java 9.')

// Execute concurrent builds if necessary.
concurrentBuild()

// Set common parameters.
common_job_properties.setTopLevelMainJobProperties(
delegate,
'master',
'JDK 1.9 (latest)',
120)

// Sets that this is a PreCommit job.
common_job_properties.setPreCommit(delegate, 'Maven clean install (Java 9)')

// Set Maven parameters.
common_job_properties.setMavenConfig(delegate)

// Maven build project
goals('clean apache-rat:check package spotbugs:check')
}