beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [1/2] beam git commit: Enable oneshots of Jenkins runs in precommit.
Date Fri, 03 Feb 2017 23:58:12 GMT
Repository: beam
Updated Branches:
  refs/heads/master 72fef99a6 -> fbd69dcf7


Enable oneshots of Jenkins runs in precommit.

Signed-off-by: Jason Kuster <jasonkuster@google.com>


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/16c8e9fe
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/16c8e9fe
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/16c8e9fe

Branch: refs/heads/master
Commit: 16c8e9fe40e89097d44c0116bc14fe57c818d0a2
Parents: 72fef99
Author: Jason Kuster <jasonkuster@google.com>
Authored: Wed Feb 1 15:32:44 2017 -0800
Committer: Davor Bonaci <davor@google.com>
Committed: Fri Feb 3 15:57:45 2017 -0800

----------------------------------------------------------------------
 .jenkins/common_job_properties.groovy           | 27 ++++++++++++++++++--
 ...ostCommit_Java_RunnableOnService_Apex.groovy |  6 +++++
 ...ommit_Java_RunnableOnService_Dataflow.groovy |  6 +++++
 ...stCommit_Java_RunnableOnService_Flink.groovy |  6 +++++
 ...ommit_Java_RunnableOnService_Gearpump.groovy |  8 +++++-
 ...stCommit_Java_RunnableOnService_Spark.groovy |  6 +++++
 .../job_beam_PostCommit_Python_Verify.groovy    |  6 +++++
 .../job_beam_PreCommit_Java_MavenInstall.groovy |  2 +-
 .../job_beam_PreCommit_Website_Stage.groovy     |  2 +-
 .jenkins/job_beam_PreCommit_Website_Test.groovy |  2 +-
 .jenkins/job_seed.groovy                        |  6 +++++
 11 files changed, 71 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/common_job_properties.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/common_job_properties.groovy b/.jenkins/common_job_properties.groovy
index eee1cda..3c77aab 100644
--- a/.jenkins/common_job_properties.groovy
+++ b/.jenkins/common_job_properties.groovy
@@ -100,7 +100,8 @@ class common_job_properties {
   // below to insulate callers from internal parameter defaults.
   private static def setPullRequestBuildTrigger(def context,
                                                 def commitStatusContext,
-                                                def successComment = '--none--') {
+                                                def successComment = '--none--',
+                                                def trigger_phrase = '') {
     context.triggers {
       githubPullRequest {
         admins(['asfbot'])
@@ -108,12 +109,21 @@ class common_job_properties {
         orgWhitelist(['apache'])
         allowMembersOfWhitelistedOrgsAsAdmin()
         permitAll()
+        // trigger_phrase is the argument which gets set when we want to allow
+        // post-commit builds to run against pending pull requests. This block
+        // overrides the default trigger phrase with the new one. Setting this
+        // will disable automatic invocation of this build; the phrase will be
+        // required to start it.
+        if (trigger_phrase != '') {
+          triggerPhrase(trigger_phrase)
+          onlyTriggerPhrase()
+        }
 
         extensions {
           commitStatus {
             // This is the name that will show up in the GitHub pull request UI
             // for this Jenkins project.
-            delegate.context(commitStatusContext)
+            delegate.context("Jenkins: " + commitStatusContext)
           }
 
           /*
@@ -171,6 +181,19 @@ class common_job_properties {
     setPullRequestBuildTrigger(context, commitStatusName, successComment)
   }
 
+  // Enable triggering postcommit runs against pull requests. Users can comment the trigger
phrase
+  // specified in the postcommit job and have the job run against their PR to run
+  // tests not in the presubmit suite for additional confidence.
+  static def enablePhraseTriggeringFromPullRequest(def context,
+                                         def commitStatusName,
+                                         def trigger_phrase) {
+    setPullRequestBuildTrigger(
+      context,
+      commitStatusName,
+      '--none--',
+      trigger_phrase)
+  }
+
   // Sets common config for PostCommit jobs.
   static def setPostCommit(def context,
                            def build_schedule = '0 */6 * * *',

http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Apex.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Apex.groovy b/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Apex.groovy
index f657596..b2bed00 100644
--- a/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Apex.groovy
+++ b/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Apex.groovy
@@ -31,6 +31,12 @@ mavenJob('beam_PostCommit_Java_RunnableOnService_Apex') {
   // Sets that this is a PostCommit job.
   common_job_properties.setPostCommit(delegate)
 
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+    delegate,
+    'Apache Apex Runner RunnableOnService Tests',
+    'Run Apex RunableOnService')
+
   // Maven goals for this job.
   goals('''clean verify --projects runners/apex \
       --also-make \

http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Dataflow.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Dataflow.groovy b/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Dataflow.groovy
index f849c83..c5336f1 100644
--- a/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Dataflow.groovy
+++ b/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Dataflow.groovy
@@ -34,6 +34,12 @@ mavenJob('beam_PostCommit_Java_RunnableOnService_Dataflow') {
   // Sets that this is a PostCommit job.
   common_job_properties.setPostCommit(delegate)
 
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+    delegate,
+    'Google Cloud Dataflow Runner RunnableOnService Tests',
+    'Run Dataflow RunableOnService')
+
   // Maven goals for this job.
   goals('-B -e clean verify -am -pl runners/google-cloud-dataflow-java -DforkCount=0 -DrunnableOnServicePipelineOptions=\'[
"--runner=org.apache.beam.runners.dataflow.testing.TestDataflowRunner", "--project=apache-beam-testing",
"--tempRoot=gs://temp-storage-for-runnable-on-service-tests/" ]\'')
 }

http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Flink.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Flink.groovy b/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Flink.groovy
index c0caa51..d0062ed 100644
--- a/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Flink.groovy
+++ b/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Flink.groovy
@@ -33,6 +33,12 @@ mavenJob('beam_PostCommit_Java_RunnableOnService_Flink') {
   // Sets that this is a PostCommit job.
   common_job_properties.setPostCommit(delegate)
 
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+    delegate,
+    'Apache Flink Runner RunnableOnService Tests',
+    'Run Flink RunableOnService')
+
   // Maven goals for this job.
   goals('-B -e clean verify -am -pl runners/flink/runner -Plocal-runnable-on-service-tests
-Prunnable-on-service-tests')
 }

http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Gearpump.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Gearpump.groovy b/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Gearpump.groovy
index 1e35017..17f6476 100644
--- a/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Gearpump.groovy
+++ b/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Gearpump.groovy
@@ -35,9 +35,15 @@ mavenJob('beam_PostCommit_Java_RunnableOnService_Gearpump') {
 
   // Sets that this is a PostCommit job.
   // 0 5 31 2 * will run on Feb 31 (i.e. never) according to job properties.
-  // This job triggers only on SCM.
+  // In post-commit this job triggers only on SCM changes.
   common_job_properties.setPostCommit(delegate, '0 5 31 2 *')
 
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+    delegate,
+    'Apache Gearpump Runner RunnableOnService Tests',
+    'Run Gearpump RunableOnService')
+
   // Maven goals for this job.
   goals('-B -e clean verify -am -pl runners/gearpump -DforkCount=0 -DrunnableOnServicePipelineOptions=\'[
"--runner=TestGearpumpRunner", "--streaming=false" ]\'')
 }

http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Spark.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Spark.groovy b/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Spark.groovy
index 97f6a70..f58457f 100644
--- a/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Spark.groovy
+++ b/.jenkins/job_beam_PostCommit_Java_RunnableOnService_Spark.groovy
@@ -33,6 +33,12 @@ mavenJob('beam_PostCommit_Java_RunnableOnService_Spark') {
   // Sets that this is a PostCommit job.
   common_job_properties.setPostCommit(delegate)
 
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+    delegate,
+    'Apache Spark Runner RunnableOnService Tests',
+    'Run Spark RunableOnService')
+
   // Maven goals for this job.
   goals('-B -e clean verify -am -pl runners/spark -Prunnable-on-service-tests -Plocal-runnable-on-service-tests
-Dspark.port.maxRetries=64 -Dspark.ui.enabled=false')
 }

http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/job_beam_PostCommit_Python_Verify.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PostCommit_Python_Verify.groovy b/.jenkins/job_beam_PostCommit_Python_Verify.groovy
index d92958c..c46cb3c 100644
--- a/.jenkins/job_beam_PostCommit_Python_Verify.groovy
+++ b/.jenkins/job_beam_PostCommit_Python_Verify.groovy
@@ -30,6 +30,12 @@ job('beam_PostCommit_Python_Verify') {
   // Sets that this is a PostCommit job.
   common_job_properties.setPostCommit(delegate, '0 3-22/6 * * *')
 
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+    delegate,
+    'Python SDK PostCommit Tests',
+    'Run Python PostCommit')
+
   // Execute shell command to test Python SDK.
   steps {
     shell('bash sdks/python/run_postcommit.sh')

http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/job_beam_PreCommit_Java_MavenInstall.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PreCommit_Java_MavenInstall.groovy b/.jenkins/job_beam_PreCommit_Java_MavenInstall.groovy
index ff2e476..3718551 100644
--- a/.jenkins/job_beam_PreCommit_Java_MavenInstall.groovy
+++ b/.jenkins/job_beam_PreCommit_Java_MavenInstall.groovy
@@ -35,7 +35,7 @@ mavenJob('beam_PreCommit_Java_MavenInstall') {
   common_job_properties.setMavenConfig(delegate)
 
   // Sets that this is a PreCommit job.
-  common_job_properties.setPreCommit(delegate, 'Jenkins: Maven clean install')
+  common_job_properties.setPreCommit(delegate, 'Maven clean install')
 
   // Maven goals for this job.
   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')

http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/job_beam_PreCommit_Website_Stage.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PreCommit_Website_Stage.groovy b/.jenkins/job_beam_PreCommit_Website_Stage.groovy
index 69be64d..7c64f11 100644
--- a/.jenkins/job_beam_PreCommit_Website_Stage.groovy
+++ b/.jenkins/job_beam_PreCommit_Website_Stage.groovy
@@ -29,7 +29,7 @@ job('beam_PreCommit_Website_Stage') {
   // Set pull request build trigger.
   common_job_properties.setPreCommit(
       delegate,
-      'Jenkins: automatic staging of pull requests',
+      'Automatic staging of pull requests',
       '\nJenkins built the site at commit id ${ghprbActualCommit} with ' +
       'Jekyll and staged it [here](http://apache-beam-website-pull-' +
       'requests.storage.googleapis.com/${ghprbPullId}/index.html). ' +

http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/job_beam_PreCommit_Website_Test.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_beam_PreCommit_Website_Test.groovy b/.jenkins/job_beam_PreCommit_Website_Test.groovy
index 2b55374..421b58a 100644
--- a/.jenkins/job_beam_PreCommit_Website_Test.groovy
+++ b/.jenkins/job_beam_PreCommit_Website_Test.groovy
@@ -34,7 +34,7 @@ job('beam_PreCommit_Website_Test') {
   // Set pull request build trigger.
   common_job_properties.setPreCommit(
       delegate,
-      'Jenkins: test website (dead links, etc.)')
+      'Test website (dead links, etc.)')
 
   steps {
     // Run the following shell script as a build step.

http://git-wip-us.apache.org/repos/asf/beam/blob/16c8e9fe/.jenkins/job_seed.groovy
----------------------------------------------------------------------
diff --git a/.jenkins/job_seed.groovy b/.jenkins/job_seed.groovy
index b830f88..7e5272b 100644
--- a/.jenkins/job_seed.groovy
+++ b/.jenkins/job_seed.groovy
@@ -35,6 +35,12 @@ job('beam_SeedJob') {
       false,
       'dev@beam.apache.org')
 
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+    delegate,
+    'Seed Job',
+    'Run Seed Job')
+
   steps {
     dsl {
       // A list or a glob of other groovy files to process.


Mime
View raw message