Commit Graph

10 Commits

Author SHA1 Message Date
Khai Do f594fb5c7c reference tests as examples
Remove samples and reference the tests as examples instead.

We don't need these samples for two reasons:
1. It is already duplicated in either JJB tests or documentation.
2. We don't test these samples so they may become outdated (some already have).

Change-Id: If1ba6cc8a675091e740fa254951bb8fcbcee6903
2014-05-29 09:30:49 -07:00
Manuel Desbonnet 9bb8d499b1 Add Release plugin
Add support for a 'release' wrapper section which enables the
Release Plugin
(https://wiki.jenkins-ci.org/display/JENKINS/Release+Plugin).

Change-Id: I48e9cdd3f32c4f7e3da843b6adb58767b357b2e7
Reviewed-on: https://review.openstack.org/31650
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-06-11 23:15:55 +00:00
Arnaud Fabre 78d5cd15ad gerrit: Add file paths filtering support.
Gerrit Trigger allows to restrict triggering of build depending
on which files are modified in the change.

Expose this capability with a new property file-paths.

Also cleanup documentation (omissions and formatting errors).

Change-Id: I4bfc5ab03a10622fdb5730a294037add8c1ad54f
Reviewed-on: https://review.openstack.org/25569
Reviewed-by: Antoine Musso <hashar@free.fr>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-04-03 20:03:54 +00:00
Arnaud Fabre a164f01f4a Add Sonar Plugin support.
The Sonar Plugin provides both a builder and a publisher,
the later targeting Maven projects.

This commit adds support for the publisher, which is straightforward
to configure: no option is required, the plugin finds suitable
defaults by itself.

Several parameters can be provided though, which are transferred
as is to either Sonar or Maven. Analysis can also be skipped under
certain conditions.

Change-Id: I30744d0961d623cabf7c0780ab2f0d4db2cd9295
Reviewed-on: https://review.openstack.org/25073
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2013-03-25 10:19:08 +00:00
Arnaud Fabre 2da55cf552 gerrit: Use hyphenated key names.
Hyphenated strings are now standard in Jenkins Job Builder.

Gerrit Trigger Plugin support used camelCase keys for its
configuration, and is updated to use hyphenated strings.

Old configuration style is still supported: if old key names
are found, they are converted to new style key names.

Change-Id: I3b1968f14029b69497ee543b44070db7d9c3448c
Reviewed-on: https://review.openstack.org/24730
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Anita Kuno <akuno@lavabit.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-03-21 22:20:26 +00:00
Arnaud Fabre 4ba9ebe4d3 gerrit: Add support for skipVote.
Newer versions of gerrit-trigger permit builds to forbear, depending of
the build outcome (success, failure, etc.).

This capability is exposed in jenkins-job-builder, with suitable
defaults.

Change-Id: I25e267459b93b8e18a690c4d38989196ca1298f3
Reviewed-on: https://review.openstack.org/24265
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Anita Kuno <akuno@lavabit.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-03-21 22:03:49 +00:00
Arnaud Fabre 47dc5442e6 gerrit: Add support for on changed restored/abandoned.
These triggers are supported starting at gerrit-trigger 2.8.0.

Using thoses triggers in a previous version should not cause any
problem.

Change-Id: I388cfb9424dd16dc436010c492e59dd0e896b69a
Reviewed-on: https://review.openstack.org/24264
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Anita Kuno <akuno@lavabit.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-03-21 22:03:46 +00:00
Arnaud Fabre e0787f2815 gerrit: Support gerrit-trigger >= 2.6.0.
Gerrit-trigger offers different triggers, stored in config file using
different formats.
During development of version 2.6.0, the following markup was used[1]:

  <triggerOnPatchsetUploadedEvent>true</triggerOnPatchsetUploadedEvent>
  <triggerOnChangeMergedEvent>true</triggerOnChangeMergedEvent>
  <triggerOnCommentAddedEvent>false</triggerOnCommentAddedEvent>
  <triggerOnRefUpdatedEvent>false</triggerOnRefUpdatedEvent>

That markup changed before the release of 2.6.0 [2] to:

  <triggerOnEvents>
    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent/>
    <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeRestoredEvent/>
  </triggerOnEvents>

Adjust the generated XML tree to match what gerrit-trigger expects.

This means that gerrit-trigger versions < 2.6.0 are no longer supported.

Trigger on draft published, added in 2.6.0, is now supported.

[1] Commit 8bee93a87b59d413ccec0aa84d3da10adb108eb9
[2] Commit 9ba008972a84e3ca8b2a90bd6d21295e7d7f4f94

Change-Id: I7160de1284c53d20f435e5af0d5a64b2e17c4196
Reviewed-on: https://review.openstack.org/24263
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Anita Kuno <akuno@lavabit.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-03-21 22:03:05 +00:00
Arnaud Fabre 2370375aee gerrit: Make triggerOn* parameters really use boolean values.
Parameters triggerOn* are documented as boolean, however, using values like
true or false results in exception "TypeError: cannot serialize True (type
bool)".

Theses values have special meaning in yaml, and are not loaded as string in
python. It was hence required to use quotes to make it work.

Add a sample using thoses attributes as an example.

Change-Id: Iccbda8ebc0867e173fa7ccab78db16874ddb2a45
Reviewed-on: https://review.openstack.org/24262
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: Anita Kuno <akuno@lavabit.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-03-21 21:22:55 +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