|
| 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