Added support for pre-approval checks.
Change-Id: I2243d854bbfbfb76ea6676480e4a568bc6015cb0
This commit is contained in:
parent
22532c53f6
commit
a5add02514
@ -6,6 +6,14 @@ define jenkins_jobs::generic_jobs($site, $project, $node_group, $ensure="present
|
|||||||
ensure => $ensure
|
ensure => $ensure
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jenkins_jobs::jobs::merge_check { $name:
|
||||||
|
site => $site,
|
||||||
|
project => $project,
|
||||||
|
node_group => $node_group,
|
||||||
|
trigger_branches => [[$project, '**']],
|
||||||
|
ensure => $ensure
|
||||||
|
}
|
||||||
|
|
||||||
jenkins_jobs::jobs::merge_gate { $name:
|
jenkins_jobs::jobs::merge_gate { $name:
|
||||||
site => $site,
|
site => $site,
|
||||||
project => $project,
|
project => $project,
|
||||||
|
13
modules/jenkins_jobs/manifests/jobs/merge_check.pp
Normal file
13
modules/jenkins_jobs/manifests/jobs/merge_check.pp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
define jenkins_jobs::jobs::merge_check($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
||||||
|
jenkins_jobs::build_job { "check-${name}-merge":
|
||||||
|
ensure => $ensure,
|
||||||
|
site => $site,
|
||||||
|
project => $project,
|
||||||
|
job => "merge",
|
||||||
|
node_group => $node_group,
|
||||||
|
triggers => trigger("gerrit_uploaded_merge"),
|
||||||
|
builders => builder("gerrit_git_prep"),
|
||||||
|
trigger_branches => $trigger_branches,
|
||||||
|
auth_build => true
|
||||||
|
}
|
||||||
|
}
|
14
modules/jenkins_jobs/manifests/jobs/pep8_check.pp
Normal file
14
modules/jenkins_jobs/manifests/jobs/pep8_check.pp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
define jenkins_jobs::jobs::pep8_check($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
||||||
|
jenkins_jobs::build_job { "check-${name}-pep8":
|
||||||
|
ensure => $ensure,
|
||||||
|
site => $site,
|
||||||
|
project => $project,
|
||||||
|
job => "pep8",
|
||||||
|
node_group => $node_group,
|
||||||
|
triggers => trigger("gerrit_uploaded_plain"),
|
||||||
|
builders => [builder("gerrit_git_prep"), builder("copy_bundle"), builder("pep8")],
|
||||||
|
publishers => publisher("pep8"),
|
||||||
|
trigger_branches => $trigger_branches,
|
||||||
|
auth_build => true
|
||||||
|
}
|
||||||
|
}
|
13
modules/jenkins_jobs/manifests/jobs/python26_check.pp
Normal file
13
modules/jenkins_jobs/manifests/jobs/python26_check.pp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
define jenkins_jobs::jobs::python26_check($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
||||||
|
jenkins_jobs::build_job { "check-${name}-python26":
|
||||||
|
ensure => $ensure,
|
||||||
|
site => $site,
|
||||||
|
project => $project,
|
||||||
|
job => "python26",
|
||||||
|
node_group => $node_group,
|
||||||
|
triggers => trigger("gerrit_uploaded_plain"),
|
||||||
|
builders => [builder("gerrit_git_prep"), builder("copy_bundle"), builder("python26")],
|
||||||
|
trigger_branches => $trigger_branches,
|
||||||
|
auth_build => true
|
||||||
|
}
|
||||||
|
}
|
13
modules/jenkins_jobs/manifests/jobs/python27_check.pp
Normal file
13
modules/jenkins_jobs/manifests/jobs/python27_check.pp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
define jenkins_jobs::jobs::python27_check($site, $project, $node_group, $trigger_branches, $ensure="present") {
|
||||||
|
jenkins_jobs::build_job { "check-${name}-python27":
|
||||||
|
ensure => $ensure,
|
||||||
|
site => $site,
|
||||||
|
project => $project,
|
||||||
|
job => "python27",
|
||||||
|
node_group => $node_group,
|
||||||
|
triggers => trigger("gerrit_uploaded_plain"),
|
||||||
|
builders => [builder("gerrit_git_prep"), builder("copy_bundle"), builder("python27")],
|
||||||
|
trigger_branches => $trigger_branches,
|
||||||
|
auth_build => true
|
||||||
|
}
|
||||||
|
}
|
@ -5,6 +5,27 @@ define jenkins_jobs::python_jobs($site, $project, $node_group, $ensure="present"
|
|||||||
node_group => $node_group,
|
node_group => $node_group,
|
||||||
ensure => $ensure
|
ensure => $ensure
|
||||||
}
|
}
|
||||||
|
jenkins_jobs::jobs::pep8_check { $name:
|
||||||
|
site => $site,
|
||||||
|
project => $project,
|
||||||
|
node_group => $node_group,
|
||||||
|
trigger_branches => [[$project, '**']],
|
||||||
|
ensure => $ensure
|
||||||
|
}
|
||||||
|
jenkins_jobs::jobs::python26_check { $name:
|
||||||
|
site => $site,
|
||||||
|
project => $project,
|
||||||
|
node_group => $node_group,
|
||||||
|
trigger_branches => [[$project, '**']],
|
||||||
|
ensure => $ensure
|
||||||
|
}
|
||||||
|
jenkins_jobs::jobs::python27_check { $name:
|
||||||
|
site => $site,
|
||||||
|
project => $project,
|
||||||
|
node_group => $node_group,
|
||||||
|
trigger_branches => [[$project, '**']],
|
||||||
|
ensure => $ensure
|
||||||
|
}
|
||||||
jenkins_jobs::jobs::pep8_gate { $name:
|
jenkins_jobs::jobs::pep8_gate { $name:
|
||||||
site => $site,
|
site => $site,
|
||||||
project => $project,
|
project => $project,
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
||||||
|
<spec></spec>
|
||||||
|
<gerritProjects>
|
||||||
|
<% trigger_branches.each do |trigger| %>
|
||||||
|
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
||||||
|
<compareType>PLAIN</compareType>
|
||||||
|
<pattern><%= site %>/<%= trigger[0] %></pattern>
|
||||||
|
<branches>
|
||||||
|
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||||
|
<compareType>ANT</compareType>
|
||||||
|
<pattern><%= trigger[1] %></pattern>
|
||||||
|
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||||
|
</branches>
|
||||||
|
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
||||||
|
<% end %>
|
||||||
|
</gerritProjects>
|
||||||
|
<silentMode>false</silentMode>
|
||||||
|
<escapeQuotes>true</escapeQuotes>
|
||||||
|
<triggerOnPatchsetUploadedEvent>true</triggerOnPatchsetUploadedEvent>
|
||||||
|
<triggerOnChangeMergedEvent>false</triggerOnChangeMergedEvent>
|
||||||
|
<triggerOnCommentAddedEvent>false</triggerOnCommentAddedEvent>
|
||||||
|
<triggerOnRefUpdatedEvent>false</triggerOnRefUpdatedEvent>
|
||||||
|
<buildStartMessage></buildStartMessage>
|
||||||
|
<buildFailureMessage>This change was unable to be automatically merged with the current state of the repository. Please rebase your change and upload a new patchset.</buildFailureMessage>
|
||||||
|
<buildSuccessfulMessage></buildSuccessfulMessage>
|
||||||
|
<buildUnstableMessage></buildUnstableMessage>
|
||||||
|
<customUrl></customUrl>
|
||||||
|
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
@ -0,0 +1,28 @@
|
|||||||
|
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
||||||
|
<spec></spec>
|
||||||
|
<gerritProjects>
|
||||||
|
<% trigger_branches.each do |trigger| %>
|
||||||
|
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
||||||
|
<compareType>PLAIN</compareType>
|
||||||
|
<pattern><%= site %>/<%= trigger[0] %></pattern>
|
||||||
|
<branches>
|
||||||
|
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||||
|
<compareType>ANT</compareType>
|
||||||
|
<pattern><%= trigger[1] %></pattern>
|
||||||
|
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||||
|
</branches>
|
||||||
|
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
||||||
|
<% end %>
|
||||||
|
</gerritProjects>
|
||||||
|
<silentMode>false</silentMode>
|
||||||
|
<escapeQuotes>true</escapeQuotes>
|
||||||
|
<triggerOnPatchsetUploadedEvent>true</triggerOnPatchsetUploadedEvent>
|
||||||
|
<triggerOnChangeMergedEvent>false</triggerOnChangeMergedEvent>
|
||||||
|
<triggerOnCommentAddedEvent>false</triggerOnCommentAddedEvent>
|
||||||
|
<triggerOnRefUpdatedEvent>false</triggerOnRefUpdatedEvent>
|
||||||
|
<buildStartMessage></buildStartMessage>
|
||||||
|
<buildFailureMessage></buildFailureMessage>
|
||||||
|
<buildSuccessfulMessage></buildSuccessfulMessage>
|
||||||
|
<buildUnstableMessage></buildUnstableMessage>
|
||||||
|
<customUrl></customUrl>
|
||||||
|
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
Loading…
x
Reference in New Issue
Block a user