beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [1/2] beam git commit: Make the main seed job standalone
Date Mon, 23 Oct 2017 22:12:14 GMT
Repository: beam
Updated Branches:
  refs/heads/master 9e9300214 -> fefe153cd


Make the main seed job standalone


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

Branch: refs/heads/master
Commit: 073601b019a99e16a0eec5a4a07209c3a876e77d
Parents: 9e93002
Author: Kenneth Knowles <kenn@apache.org>
Authored: Thu Oct 19 15:55:03 2017 -0700
Committer: Kenneth Knowles <kenn@apache.org>
Committed: Mon Oct 23 15:11:47 2017 -0700

----------------------------------------------------------------------
 .test-infra/jenkins/job_seed.groovy | 93 ++++++++++++++++++++++++++------
 1 file changed, 77 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/073601b0/.test-infra/jenkins/job_seed.groovy
----------------------------------------------------------------------
diff --git a/.test-infra/jenkins/job_seed.groovy b/.test-infra/jenkins/job_seed.groovy
index 2d1b07c..1ef4950 100644
--- a/.test-infra/jenkins/job_seed.groovy
+++ b/.test-infra/jenkins/job_seed.groovy
@@ -16,30 +16,91 @@
  * limitations under the License.
  */
 
-import common_job_properties
-
 // Defines the seed job, which creates or updates all other Jenkins projects.
 job('beam_SeedJob') {
   description('Automatically configures all Apache Beam Jenkins projects based' +
               ' on Jenkins DSL groovy files checked into the code repository.')
 
-  previousNames('beam_SeedJob_Main')
+  properties {
+    githubProjectUrl('https://github.com/apache/beam/')
+  }
+
+  // Restrict to only run on Jenkins executors labeled 'beam'
+  label('beam')
+
+  logRotator {
+    daysToKeep(14)
+  }
+
+  scm {
+    git {
+      remote {
+        github('apache/beam')
+
+        // ${ghprBuildId} is not interpolated by groovy, but passed through to Jenkins where
it
+        // refers to the environment variable
+        refspec(['+refs/head/*:refs/remotes/origin/*',
+                 '+refs/pull/${ghprPullId}/*:refs/remotes/origin/pr/${ghprPullId}/*']
+                .join(' '))
+
+        // The variable ${sha1} is not interpolated by groovy, but a parameter of the Jenkins
job
+        branch('${sha1}')
+
+        extensions {
+          cleanAfterCheckout()
+        }
+      }
+    }
+  }
+
+  parameters {
+    // Setup for running this job from a pull request
+    stringParam(
+        'sha1',
+        'master',
+        'Commit id or refname (eg: origin/pr/4001/head) you want to build against.')
+  }
+
+  wrappers {
+    timeout {
+      absolute(5)
+      abortBuild()
+    }
+  }
+
+  triggers {
+    // Run once per day
+    cron('0 */6 * * *')
 
-  // Set common parameters.
-  common_job_properties.setTopLevelMainJobProperties(delegate)
+    githubPullRequest {
+      admins(['asfbot'])
+      useGitHubHooks()
+      orgWhitelist(['apache'])
+      allowMembersOfWhitelistedOrgsAsAdmin()
+      permitAll()
 
-  // This is a post-commit job that runs once per day, not for every push.
-  common_job_properties.setPostCommit(
-      delegate,
-      '0 6 * * *',
-      false,
-      'dev@beam.apache.org')
+      // Also run when manually kicked on a pull request
+      triggerPhrase('Run Seed Job')
+      onlyTriggerPhrase()
 
-  // Allows triggering this build against pull requests.
-  common_job_properties.enablePhraseTriggeringFromPullRequest(
-    delegate,
-    'Seed Job',
-    'Run Seed Job')
+      extensions {
+        commitStatus {
+          context("Jenkins: Seed Job")
+        }
+
+        buildStatus {
+          completedStatus('SUCCESS', '--none--')
+          completedStatus('FAILURE', '--none--')
+          completedStatus('ERROR', '--none--')
+        }
+      }
+    }
+  }
+
+  // If anything goes wrong, mail the main dev list, because it is a big deal
+  publishers {
+    mailer('dev@beam.apache.org', false, true)
+  }
 
   steps {
     dsl {


Mime
View raw message