This is the first in a series of changes to alter the way modules
are handled.
This change removes the module section from yaml. Instead, all files in
modules/ are imported, and a 'register' function is called if it exists.
The register function can add (any number of) module classes to a module
registry. The registry will also keep track of helper functions for use
by other modules, and the register function can add those.
This sets up the ability for a module other than the 'builders' module to
register builders. Eventually, we should be able to move all OpenStack
specific builders, publishers, etc outside of the base modules; instead
we would just register an 'openstack_pep8' builder in a module of our own
that the job filler would know to invoke.
The API for modules is slightly changed, adding a root_xml method to handle
the different project types, a handle_data method for modules that want
to modify the yaml data structure before any XML is generated, and a data
parameter is added to the generate_xml method. Ideally, we will migrate
those modules that count on having a centrally stored data object to using
the one passed into this method to allow maximum flexibility. I also
envision some project-level yaml attributes to be moved closer to the
handlers that use them.
This change does inadvertently alter the XML produced. Here is the result
of test.sh: http://paste.openstack.org/show/18585/
In all cases, those are inconsistencies in the YAML that are corrected
by this change. Some jobs included an empty triggers vector (due to
module trigger_none) while others did not, so there was no way to satisfy
both behaviors. The added postbuilder section in the gerrit maven job is
there because the job specified postbuilders, but did not include the
postbuilder module. I believe the resulting XML is more desirable.
Change-Id: Ib38222e6bfc9d5b55aa497669d7023c7aaf4b7bc
Make the following changes to builders and publishers in service
of being able to handle this job:
http://paste.openstack.org/show/18541/
* Allow builders to have attributes
* Add a generic shell script builder
* Make the 'project' job attribute optional
(no link to github will be made in that case)
* Combine all separate publishers into one publisher module
so that jobs may have more than one publisher
* Name the section that lists publishers "post_build_actions"
to be consistent with the web UI
* Allow publishers to have attributes
* Add an archive artifacts publisher
* Add a parameterized build trigger publisher
* Add a parameterized build_trigger builder
* Add wrappers
* Add a build timeout wrapper
* Add a timstamp wrapper
Also, make the following small improvements:
* The 'disabled' attribute of a job is optional, defaults to false.
* Add a script to verify XML output is the same before and after
a change to the job filler (test.sh)
Change-Id: Icf2228494e431f5bf0a5f051f63842f12f6f92f1
Add a project module type with some special case rules so that
the general case does not have to add one to its yaml files.
Change-Id: Id110e79c34fa3982275f549d017adb03a1faf473
* When not using template don't skip the first job (fixes bug #1004575)
* Allow multiple templates or a mix of templates and single jobs in a project
YAML
Change-Id: I2dffa75c3fde2e7061886ffd879958933a150798
Also added full hostname support to gerrit-git-prep -- 'review.openstack.org'
instead of 'openstack'. This means it can be used with 'review-dev.openstack.org'
for instance.
Updated the jenkins job filler to use a 'review_site' parameter to facilitate that.
Updated the jenknis jobs filler to use slightly different variables
review_site
github_org
publisher_site
which are more explicit about their purpose than 'site' and 'host'.
Make the docs/tarball publishers require a site param.
Change-Id: If24be8f7a74c09b215f94d371d5f09a695e2c098
Adds support for project templates
Fixes a dep issue in Ubuntu
Switch off debug print in jenkins_talker.py
Fix pep8-check job
Remove dep on PyXML
Remove pretty printing (probably not needed anyway)
Change-Id: Id14d65674b7ab080df566fa31f2d4d5f88986e9d
This uses a python script with modules for parts of the XML. The parameters for the projects are provided using YAML scripts.
It also includes a Jenkins API module to directly inject jobs into Jenkins without requiring a restart/reload as well as a memory of which jobs have been pushed to Jenkins.
It is currently configured to replace the original Jenkins Jobs in StackForge.
What it won't yet do:
1. Delete jobs (although it isn't far off being able to)
2. check-* jobs (need to modify the trigger_gerrit module to support that)
Documentation to follow
Fixes bug #995599
Change-Id: I2a67ee2d9e8f43cbced56425ef7f80dc6a30a814