Skip to content
Merged
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
38 changes: 38 additions & 0 deletions .test-infra/jenkins/jon_PostCommit_Python3_Verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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 CommonJobProperties as commonJobProperties
import PostcommitJobBuilder

// This job defines the Python postcommit tests.
PostcommitJobBuilder.postCommitJob('beam_PostCommit_Python3_Verify', 'Run Python3 PostCommit',
'Python SDK PostCommit Tests on Python 3', this) {
description('Runs postcommit tests on the Python SDK on Python 3.')

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

// Execute shell command to test Python SDK.
steps {
gradle {
rootBuildScriptDir(commonJobProperties.checkoutDir)
tasks(':python3PostCommit')
commonJobProperties.setGradleSwitches(delegate)
}
}
}
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ task pythonPostCommit() {
dependsOn ":beam-sdks-python:postCommit"
}

task python3PostCommit() {
dependsOn ":beam-sdks-python-test-suites-dataflow-py3:postCommitIT"
dependsOn ":beam-sdks-python-test-suites-direct-py3:postCommitIT"
}

task portablePythonPreCommit() {
dependsOn ":beam-sdks-python:portablePreCommit"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ class BeamModulePlugin implements Plugin<Project> {
doLast {
project.exec {
executable 'sh'
args '-c', ". ${project.ext.envdir}/bin/activate && python ${pythonRootDir}/setup.py sdist --formats zip,gztar --dist-dir ${project.buildDir}"
args '-c', ". ${project.ext.envdir}/bin/activate && cd ${pythonRootDir} && python setup.py sdist --keep-temp --formats zip,gztar --dist-dir ${project.buildDir}"
}
def collection = project.fileTree("${project.buildDir}"){ include '**/*.tar.gz' exclude '**/apache-beam.tar.gz'}
println "sdist archive name: ${collection.singleFile}"
Expand Down
4 changes: 1 addition & 3 deletions sdks/python/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ task preCommit() {
dependsOn "testPy2Gcp"
dependsOn "testPy3Gcp"
dependsOn "lint"
dependsOn ":beam-sdks-python-precommit-dataflow:preCommitIT"
dependsOn ":beam-sdks-python-precommit-direct-py3:preCommitIT"
dependsOn ":beam-sdks-python-test-suites-dataflow:preCommitIT"
}

task portablePreCommit() {
Expand Down Expand Up @@ -388,7 +387,6 @@ task postCommit() {
dependsOn "directRunnerIT"
dependsOn "hdfsIntegrationTest"
dependsOn "postCommitIT"
dependsOn ":beam-sdks-python-precommit-dataflow-py3:preCommitIT"
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ project.ext.python3 = true

def runScriptsDir = "${project.rootDir}/sdks/python/scripts"

task preCommitIT(dependsOn: ['sdist', 'installGcpTest']) {
task postCommitIT(dependsOn: ['sdist', 'installGcpTest']) {
doLast {
def tests = [
"apache_beam.examples.wordcount_it_test:WordCountIT.test_wordcount_it",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ project.ext.python3 = true

def runScriptsDir = "${project.rootDir}/sdks/python/scripts"

task preCommitIT(dependsOn: ['sdist', 'installGcpTest']) {
task postCommitIT(dependsOn: ['sdist', 'installGcpTest']) {
// Run IT tests with TestDirectRunner in batch in Python 3.
doLast {
def batchTests = [
Expand Down
12 changes: 6 additions & 6 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ include "beam-sdks-python-container"
project(":beam-sdks-python-container").dir = file("sdks/python/container")
include "beam-sdks-python-container-py3"
project(":beam-sdks-python-container-py3").dir = file("sdks/python/container/py3")
include "beam-sdks-python-precommit-dataflow"
project(":beam-sdks-python-precommit-dataflow").dir = file("sdks/python/precommit/dataflow")
include "beam-sdks-python-precommit-dataflow-py3"
project(":beam-sdks-python-precommit-dataflow-py3").dir = file("sdks/python/precommit/dataflow/py3")
include "beam-sdks-python-precommit-direct-py3"
project(":beam-sdks-python-precommit-direct-py3").dir = file("sdks/python/precommit/direct/py3")
include "beam-sdks-python-test-suites-dataflow"
project(":beam-sdks-python-test-suites-dataflow").dir = file("sdks/python/test-suites/dataflow")
include "beam-sdks-python-test-suites-dataflow-py3"
project(":beam-sdks-python-test-suites-dataflow-py3").dir = file("sdks/python/test-suites/dataflow/py3")
include "beam-sdks-python-test-suites-direct-py3"
project(":beam-sdks-python-test-suites-direct-py3").dir = file("sdks/python/test-suites/direct/py3")
include "beam-vendor-grpc-1_13_1"
project(":beam-vendor-grpc-1_13_1").dir = file("vendor/grpc-1_13_1")
include "beam-sdks-java-test-utils"
Expand Down