Skip to content

Commit 25790a4

Browse files
committed
Split Java and Python precommit jobs
1 parent 9379ca2 commit 25790a4

2 files changed

Lines changed: 73 additions & 4 deletions

File tree

.test-infra/jenkins/job_beam_PreCommit_Java_MavenInstall.groovy

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,21 @@ mavenJob('beam_PreCommit_Java_MavenInstall') {
3838
common_job_properties.setMavenConfig(delegate)
3939

4040
// Sets that this is a PreCommit job.
41-
common_job_properties.setPreCommit(delegate, 'Maven clean install')
42-
43-
// Maven goals for this job.
44-
goals('-B -e -Prelease,include-runners,jenkins-precommit,direct-runner,dataflow-runner,spark-runner,flink-runner,apex-runner -DrepoToken=$COVERALLS_REPO_TOKEN -DpullRequest=$ghprbPullId help:effective-settings clean install coveralls:report')
41+
common_job_properties.setPreCommit(delegate, 'mvn clean install -pl sdks/java/core -am -amd')
42+
43+
// Maven goals for this job: The Java SDK, its dependencies, and things that depend on it.
44+
goals('''\
45+
--batch-mode \
46+
--errors \
47+
--activate-profiles release,jenkins-precommit,direct-runner,dataflow-runner,spark-runner,flink-runner,apex-runner \
48+
--projects sdks/java/core \
49+
--also-make \
50+
--also-make-dependents \
51+
-D repoToken=$COVERALLS_REPO_TOKEN \
52+
-D pullRequest=$ghprbPullId \
53+
help:effective-settings \
54+
clean \
55+
install \
56+
coveralls:report \
57+
''')
4558
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
import common_job_properties
20+
21+
// This is the Java precommit which runs a maven install, and the current set
22+
// of precommit tests.
23+
mavenJob('beam_PreCommit_Python_MavenInstall') {
24+
description('Runs an install of the current GitHub Pull Request.')
25+
26+
previousNames('beam_PreCommit_MavenVerify')
27+
28+
// Execute concurrent builds if necessary.
29+
concurrentBuild()
30+
31+
// Set common parameters.
32+
common_job_properties.setTopLevelMainJobProperties(
33+
delegate,
34+
'master',
35+
150)
36+
37+
// Set Maven parameters.
38+
common_job_properties.setMavenConfig(delegate)
39+
40+
// Sets that this is a PreCommit job.
41+
common_job_properties.setPreCommit(delegate, 'mvn clean install -pl sdks/python -am -amd')
42+
43+
// Maven goals for this job: The Python SDK, its dependencies, and things that depend on it.
44+
goals('''\
45+
--batch-mode \
46+
--errors \
47+
--activate-profiles release,jenkins-precommit,direct-runner,dataflow-runner,spark-runner,flink-runner,apex-runner \
48+
--projects sdks/python \
49+
--also-make \
50+
--also-make-dependents \
51+
-D pullRequest=$ghprbPullId \
52+
help:effective-settings \
53+
clean \
54+
install
55+
''')
56+
}

0 commit comments

Comments
 (0)