You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2018/07/30 20:17:22 UTC
[beam] branch master updated: Add GitScm poll trigger for
post-commit tests.
This is an automated email from the ASF dual-hosted git repository.
pabloem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 01414c5 Add GitScm poll trigger for post-commit tests.
01414c5 is described below
commit 01414c5d3e723d2ceb4a4224f67c3f4332ac5cd0
Author: Mikhail Gryzykhin <mi...@google.com>
AuthorDate: Mon Jul 30 11:28:31 2018 -0700
Add GitScm poll trigger for post-commit tests.
---
.test-infra/jenkins/CommonJobProperties.groovy | 7 +++++++
.test-infra/jenkins/PostcommitJobBuilder.groovy | 3 ++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/.test-infra/jenkins/CommonJobProperties.groovy b/.test-infra/jenkins/CommonJobProperties.groovy
index 99745f8..a804304 100644
--- a/.test-infra/jenkins/CommonJobProperties.groovy
+++ b/.test-infra/jenkins/CommonJobProperties.groovy
@@ -224,6 +224,7 @@ class CommonJobProperties {
// Sets common config for jobs which run on a schedule; optionally on push
static void setAutoJob(context,
+ triggerOnCommit = false,
String buildSchedule = '0 */6 * * *',
notifyAddress = 'commits@beam.apache.org') {
@@ -231,8 +232,14 @@ class CommonJobProperties {
context.triggers {
// By default runs every 6 hours.
cron(buildSchedule)
+
+ if (triggerOnCommit){
+ githubPush()
+ }
}
+
+
context.publishers {
// Notify an email address for each failed build (defaults to commits@).
mailer(
diff --git a/.test-infra/jenkins/PostcommitJobBuilder.groovy b/.test-infra/jenkins/PostcommitJobBuilder.groovy
index 9ca88bc..3235582 100644
--- a/.test-infra/jenkins/PostcommitJobBuilder.groovy
+++ b/.test-infra/jenkins/PostcommitJobBuilder.groovy
@@ -47,8 +47,9 @@ class PostcommitJobBuilder {
void defineAutoPostCommitJob(name) {
def autoBuilds = scope.job(name) {
- commonJobProperties.setAutoJob delegate
+ commonJobProperties.setAutoJob delegate, true
}
+
autoBuilds.with(jobDefinition)
}