Commit Graph

25 Commits

Author SHA1 Message Date
Ian Wienand ced1495a96 Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: I250cbe6699b73d7ddeb3c6e2b875ce8e439276be
2019-03-24 20:33:56 +00:00
Sorin Sbarnea 92f28a591e
Allow jjb to be called as a module
Enable us to do `python -m jenkins_jobs ...`
which avoids the need to install executable in
user path.

Tests cli execution on each supported python version.

Uses default encoding workaround only on
python2, where is needed.

Change-Id: I4cd79fd51a8309d532e0e76723ecfbbda3e1ca6f
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2018-06-19 23:25:43 +01:00
Tim Burke 30a961ea97 Remove dead tool jenkins-jobs.py
Looks like the jenkins_jobs/cmd.py module it references was removed back
in December, but the tool slipped by. Since it's been nine months and no
one seems to have noticed, just remove it instead of updating it to use
jenkins_jobs/cli/entry.py

Change-Id: I9a888036f280addc7c57d649d673c24bf36e62d7
Related-Change: Ia0d3a062de16c4be10863372c753f4ba8480e620
2016-09-26 16:03:11 -07:00
Darragh Bailey 5fc781c9ed Remove obsolete tools script
Change-Id: Ia578a43b761ee1d6129be3811976bdd407ca2220
2016-06-06 19:38:21 +00:00
Darragh Bailey 31d5996192 Allow testing non-default configs with complex definitions
Ensure we can provide multiple configurations to exercise different
behaviour within modules with complex job definition inputs.

This ensures that behaviour can be put behind config options, while
providing a platform to exercise these non-default values with the full
complexity of the OpenStack JJB definitions.

Since config options may result in different output, success is
determined by simply succeeding in executing JJB without error.

For additional review, any differences are outputted.

Change-Id: Ifd2b48ae85fbe7b5a2858dd426137c735c6ccd02
2016-05-26 15:37:23 +01:00
Darragh Bailey d9bdbef137 Copy config files tree
Make it easier for a complex organisation of configuration files for
testing, since JJB supports recursive searching and storing of scripts
in separate files to be inlined automatically using the '!include*'
tags.

Change-Id: I858103a2dae4aebdfbd9762b33858f4f84016350
2015-11-10 16:11:38 +00:00
Khai Do 3d5fa3ba25 Change zuul-cloner parameters
Current clone works but would be better to pass just
'git://git.openstack.org' as the zuul-cloner base so it will be
more convienant to update if needed.  Added a clonemap to
clone the project into the current directory.

Change-Id: If407ffd47678d260645b205b876d904da7e98218
2015-06-15 11:08:08 -07:00
Darragh Bailey d4ddd8a1d7 Fall back to git clone if zuul-cloner not available
Allow running of the compare test on developer workstations where it is
less common for zuul-cloner to be present by falling back to using git
clone with a depth of 1 if zuul-cloner is not available.

Change-Id: Idedc726bea12fb8862cd9574d9ce17b29011c15f
2015-06-09 11:51:23 +01:00
Khai Do 23c851eb2a Fix jenkins-job-builder-compare-xml job by using zuul-cloner
The script in jenkins-job-builder-compare-xml job failed due to git clone
executing a shallow clone:
  Cloning into 'project-config'...
  fatal: The remote end hung up unexpectedly
  fatal: protocol error: bad pack header

This can be fixed by just removing the '/p/' from the url but we would
rather use the zuul-cloner because it can take advantage of the local
git cache on disk thus allowing for more efficient cloning.

Change-Id: I05f1c928a15cf5e791a95a01975e8aba78f4953f
2015-03-25 15:25:06 -07:00
Darragh Bailey 87ab085159 Switch to new project-config repo
Change the comparison script to use the new project-config repo created
due to a reorganization of the puppet modules and JJB config used for
openstack infrastructure.

Change-Id: Icbe8ddc7fcc6af9cc11d664e01ab6fd52ef8d288
2014-09-30 18:24:08 +01:00
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