Add Jenkins job filler to puppet
Adds default Openstack jobs for a given project name into Jenkins To envoke add a section as follows to your site manifest: class { "jenkins_jobs": site => "openstack", projects => ["project1", "project2"] } Now using xml building blocks! Change-Id: If4cacba91d3dc22207e53413543e5bcfcfb0b541
This commit is contained in:
parent
5405cc4f4d
commit
e53a05ac39
85
modules/jenkins_jobs/manifests/add_jobs.pp
Normal file
85
modules/jenkins_jobs/manifests/add_jobs.pp
Normal file
@ -0,0 +1,85 @@
|
||||
define jenkins_jobs::add_jobs($site) {
|
||||
$project = $name
|
||||
|
||||
jenkins_jobs::job { "${name}-coverage":
|
||||
site => "${site}",
|
||||
project => "${name}",
|
||||
job => "coverage",
|
||||
logrotate => template("jenkins_jobs/logrotate.xml.erb"),
|
||||
builders => [template("jenkins_jobs/builder_copy_bundle.xml.erb"), template("jenkins_jobs/builder_coverage.xml.erb")],
|
||||
publishers => template("jenkins_jobs/publisher_coverage.xml.erb"),
|
||||
triggers => template("jenkins_jobs/trigger_timed_15mins.xml.erb"),
|
||||
scm => template("jenkins_jobs/scm_git.xml.erb")
|
||||
}
|
||||
|
||||
jenkins_jobs::job { "${name}-docs":
|
||||
site => "${site}",
|
||||
project => "${name}",
|
||||
job => "docs",
|
||||
triggers => template("jenkins_jobs/trigger_timed_15mins.xml.erb"),
|
||||
builders => [template("jenkins_jobs/builder_copy_bundle.xml.erb"), template("jenkins_jobs/builder_docs.xml.erb")],
|
||||
publishers => template("jenkins_jobs/publisher_docs.xml.erb"),
|
||||
scm => template("jenkins_jobs/scm_git.xml.erb")
|
||||
}
|
||||
|
||||
jenkins_jobs::job { "${name}-merge":
|
||||
site => "${site}",
|
||||
project => "${name}",
|
||||
job => "merge",
|
||||
triggers => template("jenkins_jobs/trigger_gerrit_comment.xml.erb"),
|
||||
builders => template("jenkins_jobs/builder_gerrit_git_prep.xml.erb")
|
||||
}
|
||||
|
||||
jenkins_jobs::job { "${name}-pep8":
|
||||
site => "${site}",
|
||||
project => "${name}",
|
||||
job => "pep8",
|
||||
triggers => template("jenkins_jobs/trigger_gerrit_comment.xml.erb"),
|
||||
builders => [template("jenkins_jobs/builder_gerrit_git_prep.xml.erb"), template("jenkins_jobs/builder_copy_bundle.xml.erb"), template("jenkins_jobs/builder_pep8.xml.erb")],
|
||||
publishers => template("jenkins_jobs/publisher_pep8.xml.erb")
|
||||
}
|
||||
|
||||
jenkins_jobs::job { "${name}-ppa":
|
||||
site => "${site}",
|
||||
project => "${name}",
|
||||
job => "ppa",
|
||||
builders => template("jenkins_jobs/builder_ppa.xml.erb"),
|
||||
publishers => template("jenkins_jobs/publisher_ppa.xml.erb")
|
||||
}
|
||||
|
||||
jenkins_jobs::job { "${name}-python26":
|
||||
site => "${site}",
|
||||
project => "${name}",
|
||||
job => "python26",
|
||||
triggers => template("jenkins_jobs/trigger_gerrit_comment.xml.erb"),
|
||||
builders => [template("jenkins_jobs/builder_gerrit_git_prep.xml.erb"), template("jenkins_jobs/builder_copy_bundle.xml.erb"), template("jenkins_jobs/builder_python26.xml.erb")],
|
||||
}
|
||||
|
||||
jenkins_jobs::job { "${name}-python27":
|
||||
site => "${site}",
|
||||
project => "${name}",
|
||||
job => "python27",
|
||||
triggers => template("jenkins_jobs/trigger_gerrit_comment.xml.erb"),
|
||||
builders => [template("jenkins_jobs/builder_gerrit_git_prep.xml.erb"), template("jenkins_jobs/builder_copy_bundle.xml.erb"), template("jenkins_jobs/builder_python27.xml.erb")],
|
||||
}
|
||||
|
||||
jenkins_jobs::job { "${name}-tarball":
|
||||
site => "${site}",
|
||||
project => "${name}",
|
||||
job => "tarball",
|
||||
triggers => template("jenkins_jobs/trigger_gerrit_ref_updated.xml.erb"),
|
||||
builders => [template("jenkins_jobs/builder_gerrit_git_prep.xml.erb"), template("jenkins_jobs/builder_copy_bundle.xml.erb"), template("jenkins_jobs/builder_tarball.xml.erb")],
|
||||
publishers => template("jenkins_jobs/publisher_tarball.xml.erb")
|
||||
}
|
||||
|
||||
jenkins_jobs::job { "${name}-venv":
|
||||
site => "${site}",
|
||||
project => "${job}",
|
||||
job => "venv",
|
||||
triggers => template("jenkins_jobs/trigger_timed_midnight.xml.erb"),
|
||||
builders => template("jenkins_jobs/builder_venv.xml.erb"),
|
||||
publishers => template("jenkins_jobs/publisher_venv.xml.erb"),
|
||||
scm => template("jenkins_jobs/scm_git.xml.erb")
|
||||
}
|
||||
|
||||
}
|
10
modules/jenkins_jobs/manifests/init.pp
Normal file
10
modules/jenkins_jobs/manifests/init.pp
Normal file
@ -0,0 +1,10 @@
|
||||
class jenkins_jobs($site, $projects) {
|
||||
|
||||
service { "jenkins":
|
||||
ensure => running
|
||||
}
|
||||
|
||||
jenkins_jobs::add_jobs { $projects:
|
||||
site => "${site}"
|
||||
}
|
||||
}
|
44
modules/jenkins_jobs/manifests/job.pp
Normal file
44
modules/jenkins_jobs/manifests/job.pp
Normal file
@ -0,0 +1,44 @@
|
||||
define jenkins_jobs::job($site, $project, $job, $triggers="", $builders, $publishers="", $logrotate="", $scm="") {
|
||||
|
||||
file { "/var/lib/jenkins/jobs/${project}-${job}":
|
||||
ensure => directory,
|
||||
owner => 'jenkins',
|
||||
group => 'nogroup'
|
||||
}
|
||||
|
||||
file { "/var/lib/jenkins/jobs/${project}-${job}/builds":
|
||||
ensure => directory,
|
||||
owner => 'jenkins',
|
||||
group => 'nogroup',
|
||||
require => File["/var/lib/jenkins/jobs/${project}-${job}"],
|
||||
notify => Service["jenkins"]
|
||||
}
|
||||
|
||||
file { "/var/lib/jenkins/jobs/${project}-${job}/config-history":
|
||||
ensure => directory,
|
||||
owner => 'jenkins',
|
||||
group => 'nogroup',
|
||||
require => File["/var/lib/jenkins/jobs/${project}-${job}"],
|
||||
notify => Service["jenkins"]
|
||||
}
|
||||
|
||||
file { "/var/lib/jenkins/jobs/${project}-${job}/config.xml":
|
||||
ensure => present,
|
||||
content => template("jenkins_jobs/body.xml.erb"),
|
||||
owner => 'jenkins',
|
||||
group => 'nogroup',
|
||||
require => File["/var/lib/jenkins/jobs/${project}-${job}"],
|
||||
notify => Service["jenkins"]
|
||||
}
|
||||
|
||||
file { "/var/lib/jenkins/jobs/${project}-${job}/nextBuildNumer":
|
||||
ensure => present,
|
||||
content => "1",
|
||||
owner => 'jenkins',
|
||||
group => 'nogroup',
|
||||
replace => false,
|
||||
require => File["/var/lib/jenkins/jobs/${project}-${job}"],
|
||||
notify => Service["jenkins"]
|
||||
}
|
||||
|
||||
}
|
59
modules/jenkins_jobs/templates/body.xml.erb
Normal file
59
modules/jenkins_jobs/templates/body.xml.erb
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<project>
|
||||
<actions/>
|
||||
<description></description>
|
||||
<%= logrotate %>
|
||||
<keepDependencies>false</keepDependencies>
|
||||
<properties>
|
||||
<com.coravy.hudson.plugins.github.GithubProjectProperty>
|
||||
<projectUrl>https://github.com/<%= site %>/<%= project %>/</projectUrl>
|
||||
</com.coravy.hudson.plugins.github.GithubProjectProperty>
|
||||
<hudson.plugins.throttleconcurrents.ThrottleJobProperty>
|
||||
<maxConcurrentPerNode>0</maxConcurrentPerNode>
|
||||
<maxConcurrentTotal>0</maxConcurrentTotal>
|
||||
<categories/>
|
||||
<throttleEnabled>false</throttleEnabled>
|
||||
<throttleOption>project</throttleOption>
|
||||
<configVersion>1</configVersion>
|
||||
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
|
||||
<EnvInjectJobProperty>
|
||||
<info>
|
||||
<propertiesContent>PROJECT=<%= project %></propertiesContent>
|
||||
<loadFilesFromMaster>false</loadFilesFromMaster>
|
||||
</info>
|
||||
<on>true</on>
|
||||
<keepJenkinsSystemVariables>true</keepJenkinsSystemVariables>
|
||||
<keepBuildVariables>true</keepBuildVariables>
|
||||
<contributors/>
|
||||
</EnvInjectJobProperty>
|
||||
<hudson.security.AuthorizationMatrixProperty>
|
||||
<permission>hudson.model.Item.Build:authenticated</permission>
|
||||
</hudson.security.AuthorizationMatrixProperty>
|
||||
</properties>
|
||||
<% if scm == "" %>
|
||||
<scm class="hudson.scm.NullSCM"/>
|
||||
<% else %>
|
||||
<%= scm %>
|
||||
<% end %>
|
||||
<canRoam>false</canRoam>
|
||||
<disabled>false</disabled>
|
||||
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
|
||||
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
|
||||
<% if triggers != "" %>
|
||||
<triggers class="vector">
|
||||
<%= triggers %>
|
||||
</triggers>
|
||||
<% end %>
|
||||
<concurrentBuild>false</concurrentBuild>
|
||||
<% if builders != "" %>
|
||||
<builders>
|
||||
<%= builders %>
|
||||
</builders>
|
||||
<% end %>
|
||||
<% if publishers != "" %>
|
||||
<publishers>
|
||||
<%= publishers %>
|
||||
</publishers>
|
||||
<% end %>
|
||||
<buildWrappers/>
|
||||
</project>
|
23
modules/jenkins_jobs/templates/builder_copy_bundle.xml.erb
Normal file
23
modules/jenkins_jobs/templates/builder_copy_bundle.xml.erb
Normal file
@ -0,0 +1,23 @@
|
||||
<builders>
|
||||
<hudson.plugins.copyartifact.CopyArtifact>
|
||||
<projectName>$PROJECT-venv</projectName>
|
||||
<filter></filter>
|
||||
<target></target>
|
||||
<selector class="hudson.plugins.copyartifact.StatusBuildSelector"/>
|
||||
</hudson.plugins.copyartifact.CopyArtifact>
|
||||
<hudson.tasks.Shell>
|
||||
<command># Support jobs, such as nova-docs, which are not yet triggered by gerrit
|
||||
if [ "x$GERRIT_BRANCH" = "x" ] ; then
|
||||
GERRIT_BRANCH=master
|
||||
fi
|
||||
mv jenkins_venvs/$GERRIT_BRANCH/.cache.bundle .
|
||||
rm -fr jenkins_venvs
|
||||
|
||||
if [ -f tools/test-requires -a \
|
||||
`git diff HEAD^1 tools/test-requires 2>/dev/null | wc -l` -gt 0 -o \
|
||||
`git diff HEAD^1 tools/pip-requires 2>/dev/null | wc -l` -gt 0 ]
|
||||
then
|
||||
rm .cache.bundle
|
||||
fi</command>
|
||||
</hudson.tasks.Shell>
|
||||
</builders>
|
9
modules/jenkins_jobs/templates/builder_coverage.xml.erb
Normal file
9
modules/jenkins_jobs/templates/builder_coverage.xml.erb
Normal file
@ -0,0 +1,9 @@
|
||||
<hudson.tasks.Shell>
|
||||
<command>if [ -f .cache.bundle ] ; then
|
||||
tox -ejenkinscover
|
||||
else
|
||||
tox -evenv -- nosetests test/unit --with-xcoverage --cover-erase --cover-package=<%= project %>
|
||||
|
||||
fi</command>
|
||||
</hudson.tasks.Shell>
|
||||
|
10
modules/jenkins_jobs/templates/builder_docs.xml.erb
Normal file
10
modules/jenkins_jobs/templates/builder_docs.xml.erb
Normal file
@ -0,0 +1,10 @@
|
||||
<hudson.tasks.Shell>
|
||||
<command>mkdir -p doc/build
|
||||
export HUDSON_PUBLISH_DOCS=1
|
||||
if [ -f .cache.bundle ] ; then
|
||||
tox -ejenkinsvenv python setup.py build_sphinx
|
||||
else
|
||||
tox -evenv python setup.py build_sphinx
|
||||
fi</command>
|
||||
</hudson.tasks.Shell>
|
||||
|
@ -0,0 +1,31 @@
|
||||
<hudson.tasks.Shell>
|
||||
<command>#!/bin/bash -xe
|
||||
|
||||
if [ -z "$GERRIT_NEWREV" ] && [ -z "$GERRIT_REFSPEC" ]
|
||||
then
|
||||
echo "This job may only be triggered by Gerrit."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -e .git ]]
|
||||
then
|
||||
git clone https://review.<%= site %>.org/p/$GERRIT_PROJECT .
|
||||
fi
|
||||
git remote update || git remote update # attempt to work around bug #925790
|
||||
git reset --hard
|
||||
git clean -x -f -d -q
|
||||
|
||||
if [ ! -z "$GERRIT_REFSPEC" ]
|
||||
then
|
||||
git checkout $GERRIT_BRANCH
|
||||
git reset --hard remotes/origin/$GERRIT_BRANCH
|
||||
git clean -x -f -d -q
|
||||
git fetch https://review.<%= site %>.org/p/$GERRIT_PROJECT $GERRIT_REFSPEC
|
||||
git merge FETCH_HEAD
|
||||
else
|
||||
git checkout $GERRIT_NEWREV
|
||||
git reset --hard $GERRIT_NEWREV
|
||||
git clean -x -f -d -q
|
||||
fi
|
||||
</command>
|
||||
</hudson.tasks.Shell>
|
9
modules/jenkins_jobs/templates/builder_pep8.xml.erb
Normal file
9
modules/jenkins_jobs/templates/builder_pep8.xml.erb
Normal file
@ -0,0 +1,9 @@
|
||||
<hudson.tasks.Shell>
|
||||
<command>#!/bin/sh
|
||||
|
||||
if [ -f .cache.bundle ] ; then
|
||||
tox -v -ejenkinspep8 | tee pep8.txt
|
||||
else
|
||||
tox -v -epep8 | tee pep8.txt
|
||||
fi</command>
|
||||
</hudson.tasks.Shell>
|
22
modules/jenkins_jobs/templates/builder_ppa.xml.erb
Normal file
22
modules/jenkins_jobs/templates/builder_ppa.xml.erb
Normal file
@ -0,0 +1,22 @@
|
||||
<hudson.tasks.Shell>
|
||||
<command>rm -rf build dist.zip
|
||||
mkdir build
|
||||
</command>
|
||||
</hudson.tasks.Shell>
|
||||
<hudson.plugins.copyartifact.CopyArtifact>
|
||||
<projectName><%= project %>-tarball</projectName>
|
||||
<filter>dist/*.tar.gz</filter>
|
||||
<target>build</target>
|
||||
<selector class="hudson.plugins.copyartifact.ParameterizedBuildSelector">
|
||||
<parameterName>BUILD_SELECTOR</parameterName>
|
||||
</selector>
|
||||
</hudson.plugins.copyartifact.CopyArtifact>
|
||||
<hudson.tasks.Shell>
|
||||
<command>#!/bin/bash
|
||||
|
||||
#export DO_UPLOAD="no"
|
||||
export PROJECT="<%= project %>"
|
||||
export GERRIT_REFNAME=$BRANCH
|
||||
/bin/bash -xe ~/openstack-ci/slave_scripts/create-ppa-package.sh
|
||||
</command>
|
||||
</hudson.tasks.Shell>
|
8
modules/jenkins_jobs/templates/builder_python26.xml.erb
Normal file
8
modules/jenkins_jobs/templates/builder_python26.xml.erb
Normal file
@ -0,0 +1,8 @@
|
||||
<hudson.tasks.Shell>
|
||||
<command>if [ -f .cache.bundle ]
|
||||
then
|
||||
tox -v -ejenkinspy26
|
||||
else
|
||||
tox -v -epy26
|
||||
fi</command>
|
||||
</hudson.tasks.Shell>
|
8
modules/jenkins_jobs/templates/builder_python27.xml.erb
Normal file
8
modules/jenkins_jobs/templates/builder_python27.xml.erb
Normal file
@ -0,0 +1,8 @@
|
||||
<hudson.tasks.Shell>
|
||||
<command>if [ -f .cache.bundle ]
|
||||
then
|
||||
tox -v -ejenkinspy27
|
||||
else
|
||||
tox -v -epy27
|
||||
fi</command>
|
||||
</hudson.tasks.Shell>
|
4
modules/jenkins_jobs/templates/builder_tarball.xml.erb
Normal file
4
modules/jenkins_jobs/templates/builder_tarball.xml.erb
Normal file
@ -0,0 +1,4 @@
|
||||
<hudson.tasks.Shell>
|
||||
<command>~/openstack-ci/slave_scripts/create-tarball.sh
|
||||
</command>
|
||||
</hudson.tasks.Shell>
|
3
modules/jenkins_jobs/templates/builder_venv.xml.erb
Normal file
3
modules/jenkins_jobs/templates/builder_venv.xml.erb
Normal file
@ -0,0 +1,3 @@
|
||||
<hudson.tasks.Shell>
|
||||
<command>bash -x ~/openstack-ci/slave_scripts/build-bundle.sh</command>
|
||||
</hudson.tasks.Shell>
|
7
modules/jenkins_jobs/templates/logrotate.xml.erb
Normal file
7
modules/jenkins_jobs/templates/logrotate.xml.erb
Normal file
@ -0,0 +1,7 @@
|
||||
<logRotator>
|
||||
<daysToKeep>3</daysToKeep>
|
||||
<numToKeep>20</numToKeep>
|
||||
<artifactDaysToKeep>-1</artifactDaysToKeep>
|
||||
<artifactNumToKeep>-1</artifactNumToKeep>
|
||||
</logRotator>
|
||||
|
53
modules/jenkins_jobs/templates/publisher_coverage.xml.erb
Normal file
53
modules/jenkins_jobs/templates/publisher_coverage.xml.erb
Normal file
@ -0,0 +1,53 @@
|
||||
<hudson.plugins.cobertura.CoberturaPublisher>
|
||||
<coberturaReportFile>**/coverage.xml</coberturaReportFile>
|
||||
<onlyStable>false</onlyStable>
|
||||
<healthyTarget>
|
||||
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
|
||||
<entry>
|
||||
<hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
|
||||
<int>70</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
|
||||
<int>80</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
|
||||
<int>80</int>
|
||||
</entry>
|
||||
</targets>
|
||||
</healthyTarget>
|
||||
<unhealthyTarget>
|
||||
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
|
||||
<entry>
|
||||
<hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
|
||||
<int>0</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
|
||||
<int>0</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
|
||||
<int>0</int>
|
||||
</entry>
|
||||
</targets>
|
||||
</unhealthyTarget>
|
||||
<failingTarget>
|
||||
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
|
||||
<entry>
|
||||
<hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
|
||||
<int>0</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
|
||||
<int>0</int>
|
||||
</entry>
|
||||
<entry>
|
||||
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
|
||||
<int>0</int>
|
||||
</entry>
|
||||
</targets>
|
||||
</failingTarget>
|
||||
<sourceEncoding>ASCII</sourceEncoding>
|
||||
</hudson.plugins.cobertura.CoberturaPublisher>
|
20
modules/jenkins_jobs/templates/publisher_docs.xml.erb
Normal file
20
modules/jenkins_jobs/templates/publisher_docs.xml.erb
Normal file
@ -0,0 +1,20 @@
|
||||
<be.certipost.hudson.plugin.SCPRepositoryPublisher>
|
||||
<siteName><%= project %>.<%= site %>.org</siteName>
|
||||
<entries>
|
||||
<be.certipost.hudson.plugin.Entry>
|
||||
<filePath>docs/<%= project %></filePath>
|
||||
<sourceFile>doc/build/html/**</sourceFile>
|
||||
<keepHierarchy>false</keepHierarchy>
|
||||
</be.certipost.hudson.plugin.Entry>
|
||||
<be.certipost.hudson.plugin.Entry>
|
||||
<filePath>docs/<%= project %>/_static</filePath>
|
||||
<sourceFile>doc/build/html/_static/**</sourceFile>
|
||||
<keepHierarchy>false</keepHierarchy>
|
||||
</be.certipost.hudson.plugin.Entry>
|
||||
<be.certipost.hudson.plugin.Entry>
|
||||
<filePath>docs/<%= project %>/_sources</filePath>
|
||||
<sourceFile>doc/build/html/_sources/**</sourceFile>
|
||||
<keepHierarchy>false</keepHierarchy>
|
||||
</be.certipost.hudson.plugin.Entry>
|
||||
</entries>
|
||||
</be.certipost.hudson.plugin.SCPRepositoryPublisher>
|
179
modules/jenkins_jobs/templates/publisher_pep8.xml.erb
Normal file
179
modules/jenkins_jobs/templates/publisher_pep8.xml.erb
Normal file
@ -0,0 +1,179 @@
|
||||
<hudson.plugins.violations.ViolationsPublisher>
|
||||
<config>
|
||||
<suppressions class="tree-set">
|
||||
<no-comparator/>
|
||||
</suppressions>
|
||||
<typeConfigs>
|
||||
<no-comparator/>
|
||||
<entry>
|
||||
<string>checkstyle</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>checkstyle</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>codenarc</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>codenarc</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>cpd</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>cpd</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>cpplint</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>cpplint</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>csslint</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>csslint</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>findbugs</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>findbugs</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>fxcop</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>fxcop</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>gendarme</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>gendarme</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>jcreport</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>jcreport</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>jslint</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>jslint</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pep8</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>pep8</type>
|
||||
<min>0</min>
|
||||
<max>1</max>
|
||||
<unstable>1</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern>**/pep8.txt</pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pmd</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>pmd</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>pylint</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>pylint</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>simian</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>simian</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>stylecop</string>
|
||||
<hudson.plugins.violations.TypeConfig>
|
||||
<type>stylecop</type>
|
||||
<min>10</min>
|
||||
<max>999</max>
|
||||
<unstable>999</unstable>
|
||||
<usePattern>false</usePattern>
|
||||
<pattern></pattern>
|
||||
</hudson.plugins.violations.TypeConfig>
|
||||
</entry>
|
||||
</typeConfigs>
|
||||
<limit>100</limit>
|
||||
<sourcePathPattern></sourcePathPattern>
|
||||
<fauxProjectPath></fauxProjectPath>
|
||||
<encoding>default</encoding>
|
||||
</config>
|
||||
</hudson.plugins.violations.ViolationsPublisher>
|
4
modules/jenkins_jobs/templates/publisher_ppa.xml.erb
Normal file
4
modules/jenkins_jobs/templates/publisher_ppa.xml.erb
Normal file
@ -0,0 +1,4 @@
|
||||
<hudson.tasks.ArtifactArchiver>
|
||||
<artifacts>build/*.dsc,build/*.tar.gz,build/*.changes</artifacts>
|
||||
<latestOnly>false</latestOnly>
|
||||
</hudson.tasks.ArtifactArchiver>
|
30
modules/jenkins_jobs/templates/publisher_tarball.xml.erb
Normal file
30
modules/jenkins_jobs/templates/publisher_tarball.xml.erb
Normal file
@ -0,0 +1,30 @@
|
||||
<hudson.tasks.ArtifactArchiver>
|
||||
<artifacts>dist/*.tar.gz</artifacts>
|
||||
<latestOnly>false</latestOnly>
|
||||
</hudson.tasks.ArtifactArchiver>
|
||||
<be.certipost.hudson.plugin.SCPRepositoryPublisher>
|
||||
<siteName><%= project %>.<%= site %>.org</siteName>
|
||||
<entries>
|
||||
<be.certipost.hudson.plugin.Entry>
|
||||
<filePath>tarballs/<%= project %>/</filePath>
|
||||
<sourceFile>dist/*.tar.gz</sourceFile>
|
||||
<keepHierarchy>false</keepHierarchy>
|
||||
</be.certipost.hudson.plugin.Entry>
|
||||
</entries>
|
||||
</be.certipost.hudson.plugin.SCPRepositoryPublisher>
|
||||
<hudson.plugins.parameterizedtrigger.BuildTrigger>
|
||||
<configs>
|
||||
<hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
|
||||
<configs>
|
||||
<hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
|
||||
<properties>BUILD_SELECTOR=<SpecificBuildSelector><buildNumber>$BUILD_NUMBER</buildNumber></SpecificBuildSelector>
|
||||
BRANCH=$GERRIT_REFNAME
|
||||
</properties>
|
||||
</hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
|
||||
</configs>
|
||||
<projects><%= project %>-ppa</projects>
|
||||
<condition>SUCCESS</condition>
|
||||
<triggerWithNoParameters>false</triggerWithNoParameters>
|
||||
</hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
|
||||
</configs>
|
||||
</hudson.plugins.parameterizedtrigger.BuildTrigger>
|
4
modules/jenkins_jobs/templates/publisher_venv.xml.erb
Normal file
4
modules/jenkins_jobs/templates/publisher_venv.xml.erb
Normal file
@ -0,0 +1,4 @@
|
||||
<hudson.tasks.ArtifactArchiver>
|
||||
<artifacts>jenkins_venvs/**/.cache.bundle</artifacts>
|
||||
<latestOnly>false</latestOnly>
|
||||
</hudson.tasks.ArtifactArchiver>
|
34
modules/jenkins_jobs/templates/scm_git.xml.erb
Normal file
34
modules/jenkins_jobs/templates/scm_git.xml.erb
Normal file
@ -0,0 +1,34 @@
|
||||
<scm class="hudson.plugins.git.GitSCM">
|
||||
<configVersion>2</configVersion>
|
||||
<userRemoteConfigs>
|
||||
<hudson.plugins.git.UserRemoteConfig>
|
||||
<name>origin</name>
|
||||
<refspec>+refs/heads/*:refs/remotes/origin/*</refspec>
|
||||
<url>git://github.com/<%= site %>/<%= project %>.git</url>
|
||||
</hudson.plugins.git.UserRemoteConfig>
|
||||
</userRemoteConfigs>
|
||||
<branches>
|
||||
<hudson.plugins.git.BranchSpec>
|
||||
<name>**</name>
|
||||
</hudson.plugins.git.BranchSpec>
|
||||
</branches>
|
||||
<disableSubmodules>false</disableSubmodules>
|
||||
<recursiveSubmodules>false</recursiveSubmodules>
|
||||
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
|
||||
<authorOrCommitter>false</authorOrCommitter>
|
||||
<clean>false</clean>
|
||||
<wipeOutWorkspace>true</wipeOutWorkspace>
|
||||
<pruneBranches>false</pruneBranches>
|
||||
<remotePoll>false</remotePoll>
|
||||
<buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
|
||||
<gitTool>Default</gitTool>
|
||||
<submoduleCfg class="list"/>
|
||||
<relativeTargetDir></relativeTargetDir>
|
||||
<reference></reference>
|
||||
<excludedRegions></excludedRegions>
|
||||
<excludedUsers></excludedUsers>
|
||||
<gitConfigName></gitConfigName>
|
||||
<gitConfigEmail></gitConfigEmail>
|
||||
<skipTag>false</skipTag>
|
||||
<scmName></scmName>
|
||||
</scm>
|
@ -0,0 +1,28 @@
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
||||
<spec></spec>
|
||||
<gerritProjects>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
||||
<compareType>PLAIN</compareType>
|
||||
<pattern><%= site %>/<%= project %></pattern>
|
||||
<branches>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||
<compareType>ANT</compareType>
|
||||
<pattern>**</pattern>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||
</branches>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
||||
</gerritProjects>
|
||||
<silentMode>false</silentMode>
|
||||
<escapeQuotes>true</escapeQuotes>
|
||||
<triggerOnPatchsetUploadedEvent>true</triggerOnPatchsetUploadedEvent>
|
||||
<triggerOnChangeMergedEvent>false</triggerOnChangeMergedEvent>
|
||||
<triggerOnCommentAddedEvent>true</triggerOnCommentAddedEvent>
|
||||
<triggerOnRefUpdatedEvent>false</triggerOnRefUpdatedEvent>
|
||||
<commentAddedTriggerApprovalCategory>APRV</commentAddedTriggerApprovalCategory>
|
||||
<commentAddedTriggerApprovalValue>1</commentAddedTriggerApprovalValue>
|
||||
<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,25 @@
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
||||
<compareType>PLAIN</compareType>
|
||||
<pattern><%= site %>/<%= project %></pattern>
|
||||
<branches>
|
||||
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||
<compareType>REG_EXP</compareType>
|
||||
<pattern>^(?!refs/).*$</pattern>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
|
||||
</branches>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject>
|
||||
</gerritProjects>
|
||||
<silentMode>false</silentMode>
|
||||
<escapeQuotes>true</escapeQuotes>
|
||||
<triggerOnPatchsetUploadedEvent>false</triggerOnPatchsetUploadedEvent>
|
||||
<triggerOnChangeMergedEvent>false</triggerOnChangeMergedEvent>
|
||||
<triggerOnCommentAddedEvent>false</triggerOnCommentAddedEvent>
|
||||
<triggerOnRefUpdatedEvent>true</triggerOnRefUpdatedEvent>
|
||||
<commentAddedTriggerApprovalCategory></commentAddedTriggerApprovalCategory>
|
||||
<commentAddedTriggerApprovalValue></commentAddedTriggerApprovalValue>
|
||||
<buildStartMessage></buildStartMessage>
|
||||
<buildFailureMessage></buildFailureMessage>
|
||||
<buildSuccessfulMessage></buildSuccessfulMessage>
|
||||
<buildUnstableMessage></buildUnstableMessage>
|
||||
<customUrl></customUrl>
|
||||
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
|
@ -0,0 +1,3 @@
|
||||
<hudson.triggers.SCMTrigger>
|
||||
<spec>*/15 * * * *</spec>
|
||||
</hudson.triggers.SCMTrigger>
|
@ -0,0 +1,3 @@
|
||||
<hudson.triggers.TimerTrigger>
|
||||
<spec>@midnight</spec>
|
||||
</hudson.triggers.TimerTrigger>
|
Loading…
Reference in New Issue
Block a user