[ 
https://issues.apache.org/jira/browse/BEAM-3257?focusedWorklogId=87245&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-87245
 ]

ASF GitHub Bot logged work on BEAM-3257:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Apr/18 20:10
            Start Date: 03/Apr/18 20:10
    Worklog Time Spent: 10m 
      Work Description: alanmyrvold closed pull request #5006: [BEAM-3257] 
Migrate Python Jenkins PreCommits to Gradle
URL: https://github.com/apache/beam/pull/5006
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.test-infra/jenkins/job_beam_PreCommit_Python_GradleInstall.groovy 
b/.test-infra/jenkins/job_beam_PreCommit_Python_GradleInstall.groovy
new file mode 100644
index 00000000000..20643654f31
--- /dev/null
+++ b/.test-infra/jenkins/job_beam_PreCommit_Python_GradleInstall.groovy
@@ -0,0 +1,56 @@
+/*
+ * 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 Python precommit which runs a gradle build, and the current set
+// of precommit tests.
+job('beam_PreCommit_Python_GradleInstall') {
+  description('Runs Python PreCommit tests for the current GitHub Pull 
Request.')
+
+  // Execute concurrent builds if necessary.
+  concurrentBuild()
+
+  // Set common parameters.
+  common_job_properties.setTopLevelMainJobProperties(
+    delegate,
+    'master',
+    150)
+
+  def gradle_switches = [
+    // Gradle log verbosity enough to diagnose basic build issues
+    "--info",
+    // Continue the build even if there is a failure to show as many potential 
failures as possible.
+    '--continue',
+    // Until we verify the build cache is working appropriately, force 
rerunning all tasks
+    '--rerun-tasks',
+  ]
+
+  def gradle_command_line = './gradlew ' + gradle_switches.join(' ') + ' 
:pythonPreCommit'
+  // Sets that this is a PreCommit job.
+  common_job_properties.setPreCommit(delegate, gradle_command_line, 'Run 
Python Gradle PreCommit')
+  steps {
+    gradle {
+      rootBuildScriptDir(common_job_properties.checkoutDir)
+      tasks(':pythonPreCommit')
+      for (String gradle_switch : gradle_switches) {
+        switches(gradle_switch)
+      }
+    }
+  }
+}
diff --git a/build.gradle b/build.gradle
index ad58db61eeb..6dae8225dbc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -100,6 +100,7 @@ rat {
     "**/dist/**/*",
     "**/distribute-*/**/*",
     "**/env/**/*",
+    "sdks/python/.coverage",
     "sdks/python/**/*.c",
     "sdks/python/**/*.so",
     "sdks/python/**/*.egg",
@@ -107,6 +108,7 @@ rat {
     "sdks/python/NOTICE",
     "sdks/python/README.md",
     "sdks/python/apache_beam/portability/api/*pb2*.*",
+    "sdks/python/apache_beam/portability/common_urns.py",
 
     // .gitignore: Ignore IntelliJ files.
     "**/.idea/**/*",
@@ -175,3 +177,11 @@ task goPreCommit() {
   dependsOn ":rat"
   dependsOn ":sdks:go:test"
 }
+
+task pythonPreCommit() {
+  dependsOn ":rat"
+  dependsOn ":sdks:python:build"
+  dependsOn ":sdks:python:sdist"
+  dependsOn ":sdks:python:check"
+  dependsOn ":sdks:python:test"
+}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 87245)
    Time Spent: 40m  (was: 0.5h)

> Migrate Python Jenkins PreCommits to Gradle
> -------------------------------------------
>
>                 Key: BEAM-3257
>                 URL: https://issues.apache.org/jira/browse/BEAM-3257
>             Project: Beam
>          Issue Type: Sub-task
>          Components: build-system, testing
>            Reporter: Luke Cwik
>            Assignee: Udi Meiri
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Code is here: 
> https://github.com/apache/beam/blob/master/.test-infra/jenkins/job_beam_PreCommit_Python_MavenInstall.groovy



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to