15 Commits

Author SHA1 Message Date
Antoine Musso
d2ff8c098f Migrate to pbr
I found out pbr to be a bit nicer when it comes to edit files. AFAIK
most OpenStack project are using it, so I guess Jenkins Job Builder can
be pbr based as well.o

Basically:
* moved everything from setup.py to setup.cfg
* sorted entries while at it
* require pbr module using the same version limits used by Zuul
* enable pbr.warnerrors
* testenv.usedevelop = True or build_sphinx can not find entry points
* move requirement files to root of repository (we had them in /tools/)

Change-Id: I44ee8910ad4fe4eebb7337951efa31baff4281fe
2014-03-14 22:25:46 +01:00
James E. Blair
ab30ecaa4b Pin Sphinx to <1.2
1.2 was just released and has a bug that causes builds to fail with
the error:

  error: 'source_dir' must be a directory name (got `...doc/source`)

See: http://bugs.python.org/issue19570
and: https://bitbucket.org/birkenfeld/sphinx/pull-request/193/builddoc-shouldnt-fail-on-unicode-paths/diff

Change-Id: I902db0d94200692f6737827645030be82bfb9e62
2013-12-10 08:40:34 -08:00
Khai Do
d18c3cb1f5 Add usage info to JJB documentation
Display the usage info for JJB and add it to the
sphinx docs.

Fixes bug 1221944

Change-Id: I5b36cca7a836b009bfb0ca880abbccd4477de307
2013-09-09 15:14:18 -07:00
Clark Boylan
b8fbb7193d Add python26 multiline string assertion back.
The assertMultiline equal was removed for assertEqual to be python26
friendly. Testtools has a matcher that provides similar functionality
that is python26 compatible. Use testtools instead of unittest for this
functionality. Remove use of unittest.main().

Change-Id: I348b0ee0192d3164084c20d9356e69f29e1cb86c
2013-07-24 13:40:33 -07:00
Arnaud Fabre
a9cf2a2661 Tests: Use a testscenarios for running tests.
Instead of using load_tests to build a test suite out of a single
test case, rely on testscenarios. This library aims at running the
same test with different input data (`scenarios').

Some code is moved inside the test case to reduce the number of
scenario parameters (previously fixtures).

Change-Id: Iedb4cb3ad6341a9b397fa305b1ce2b329b6fdc15
2013-07-19 14:08:02 -07:00
Antoine Musso
b829874916 Tests for publishers
I am trying to build up a very basic testing framework so we can tests
our publishers. The idea is to provide a YAML input file and expected
XML output, run the parser on the YAML file and compares its output with
the fixture XML.

That test suite should speed up development of new publishers.

TestCaseModulePublisher is declared inside a function so that unittest
discovery does not consider it a usable test directly. load_test is
responsible for instantiating the test suite.

Change-Id: If3260113eb1337ac47c3883b11c600e5a595dae3
[fabre.arnaud@gmail.com: fixed some runtime errors]
Signed-off-by: Arnaud Fabre <fabre.arnaud@gmail.com>
2013-07-19 14:31:11 +02:00
James E. Blair
96a72de938 Add jenkins-jobs command line tool.
So that jenkins-jobs can be easily run for testing from the source
dir without installation.

Change-Id: Iabba59ad32ccd4b79eb8934e53c6d747110a06b0
Reviewed-on: https://review.openstack.org/26259
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2013-04-08 14:52:11 +00:00
Clark Boylan
b60770597a Stop referring to openstack/openstack-ci-puppet.
The openstack/openstack-ci-puppet repo moved and became
openstack-infra/config. Remove references to openstack-ci-puppet and
replace them with references to openstack-infra/config.

Change-Id: I75e7797995b894b6053901dbcfa351404048ea7c
Reviewed-on: https://review.openstack.org/23227
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-03-01 18:32:53 +00:00
James E. Blair
6cbb416e20 Remove setuptools-git from setup.py.
Put it in test-requires so it's there when we build a tarball.
Change-Id: I8a5adec74beeb397e71e17030338a8051fe6fb0b
Reviewed-on: https://review.openstack.org/19885
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-01-29 22:35:17 +00:00
william.soula
eb210845e4 Adding ability to specify the JDK to use. This change moves the top level config from builder.py into a separate file called general.py. This change also moves the assigned node work as well as the log rotator work into the general.py file. This change also adds the ability to specify the JDK for the build to use.
Change-Id: I0e2b43d889593e01d6ad0761960c93472990af1e
Reviewed-on: https://review.openstack.org/16983
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2012-12-19 03:18:32 +00:00
Manuel Desbonnet
211cd36318 Do not output XML if job name not specified ('pipeline', 'trigger-builds')
Done in order to enable specifying build pipelines at the project level.
Pipelines are built using the 'pipeline' plugin or the 'trigger-builds'
plugin.  The downstream job to be executed is specified at the project
level, and substituted into the template.  Ignoring definitions where
the downstream job is blank allows the pipeline to be easily terminated.

Also adding a samples/ directory, which currently contains an example of
pipeline creation, together with a new tools/run-compare-xml-samples.sh
to run the before/after test on the samples.

Change-Id: Icc324d1485e22db7824ad784890db48eb3e48f8f
Reviewed-on: https://review.openstack.org/13706
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-10-30 16:32:39 +00:00
James E. Blair
ab7c6bc6c1 Add documentation.
Move test.sh to the tools directory.
Move parameters and notifications to their own modules; even
though they are implemented as Jenkins properties, they make
more sense as separate entities in the job builder, because
that's they way they are specified in the YAML.  All three
modules that touch the properties xml object know how to
create it if it's missing.

Change-Id: I4b42ff10a93fd3ed98f632b58e47f3e0e45086d6
Reviewed-on: https://review.openstack.org/12741
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-09-17 20:25:38 +00:00
James E. Blair
f3f09c4f96 Simplify the xml test paths.
Make it easier to invoke the tox environments from another project
(eg, openstack-ci-puppet).

Change-Id: I88305c8edb79bb6e944eb35f5e39c84827807f11
Reviewed-on: https://review.openstack.org/12451
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-09-05 18:51:14 +00:00
James E. Blair
cd8a018141 Fix early exit from compare test.
Change-Id: I5a871026f2bf7757b7e3e46278391b41e90c5674
Reviewed-on: https://review.openstack.org/12289
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-09-01 15:29:59 +00:00
James E. Blair
0c2bef0803 Add test to determine whether XML output has changed.
Change-Id: I5e0b76e195a1b412d180484ce1ddd3e9159d7779
Reviewed-on: https://review.openstack.org/12286
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-09-01 03:52:21 +00:00