Commit Graph

23 Commits

Author SHA1 Message Date
Vsevolod Fedorov 6b92807cd7 Tests: Rename yamlparser tests and fixture directories
Rename fixtures directory to job_fixtures to prepare for adding view_fixtures
directory in the following commits.

Change-Id: Ic20997cae020b542ddc22bf444fa6b92fbcae064
2023-01-26 11:06:23 +03:00
Eren Atas 08678825a9 Update Gerrit Trigger Plugin Implementation
The changes between plugin version 2.30.0-2.32.0 have been
implemented. Current test cases are updated, and also new
test cases are added in order to verify old version XML
output has not been altered.

Documentation uses gerrit004.yaml as an exampple, therefore,
`build-cancellation-policy` have also been implemented to
show as example.

Signed-off-by: Eren Atas <eatas.contractor@libertyglobal.com>
Change-Id: I55fb6f8dd722d50cff369a6fba0e11c96b0c08aa
2021-05-20 15:14:46 +02:00
sp-ricard-valverde c1d8a41666 feat(scm): add git extension for lfs-pull
Add a missing extension to git scm which enables the option to do
"Git LFS pull after checkout"

Add lfs-pull fixtures

Change-Id: Ie8b98877f3f282ac0b32dbeb089e6d0d9ccc25c8
2021-03-16 18:29:56 +01:00
Adam Romanek b04ca3a82c Gerrit Trigger: update support to the latest plugin version
The changes include:

- deprecated the following options and made support for them dependent
  on the Gerrit Trigger plugin version:
  - 'no-name-and-email'
  - 'readable-message'
  - 'trigger-for-unreviewed-patches'

- added a set of new options:
  - 'name-and-email-parameter-mode' (replaced 'no-name-and-email')
  - 'commit-message-parameter-mode' (replaced 'readable-message')
  - 'change-subject-parameter-mode'
  - 'comment-text-parameter-mode'
  all these options can have one of the following values:
  - NONE
  - PLAIN
  - BASE64
  the default value for the first two options is taken from the
  respective options they replaced, if they exist in the input YAML
  file, so the overall change should be backward compatible

- fixed the value generated for <dynamicTriggerConfiguration> element
  it should be "true"/"false" instead of "True"/"False"

- added an empty <dynamicGerritProjects> element when dynamic trigger
  functionality is disabled to match what the plugin does

With the above changes the markup generated by JJB is fully aligned with
Gerrit Trigger plugin v2.30.x. Tested on Gerrit Trigger plugin v2.30.0.

Task: 39871
Story: 2007722
Change-Id: I25800874f51a93a351926a9a1be255cce80b88bd
2020-06-01 15:39:18 +02:00
Zuul ed07d8fa94 Merge "Fix timeout wrapper version detection" 2018-02-08 20:55:26 +00:00
Sorin Sbarnea ea324d31d2 gerrit-trigger: avoid exception spamming logs
Adds empty triggerInformationAction section which when
missing was generating recurring spam on Jenkins logs.

included null not assignable to interface hudson.model.Action

See https://issues.jenkins-ci.org/browse/JENKINS-45788

Change-Id: I97efbfcb17388b5ca99901aa35f4311c8db77710
2018-02-06 12:16:35 +00:00
Jan Hruban 28cab53d5d Allow template-name in the global defaults
Inject the template-name into parameters earlier, so it's possible to
use it in the global defaults. Mark the template name as 'verbatim' so
the interpolation is skipped by the formatter.

Change-Id: I5d98e32ed2bedaa6b536e61fbdec589f358f861f
2018-01-16 16:00:46 +01:00
Thomas Bechtold ecf3933dc2 Fix timeout wrapper version detection
If, for whatever reason, the version of the build-timeout
plugin can not be detected, assume that we use a newer version (>= 1.14).
Version 1.14 is already ~ 2 1/2 years old so this is a sane assumption.
Also adjust fixtures to use the newer plugin version xml output.

Change-Id: I86295933d0c3247f55d0114473fc9c8f8feb7441
Signed-off-by: Bertrand Roussel <broussel@sierrawireless.com>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2018-01-09 09:02:29 -08:00
Jeff Grafton cdfeb7bf66 Update Git SCM so that extensions are configured correctly.
Many configuration options have been extensions for at least 2 years, so
update the generated XML to actually configure these options.

Change-Id: Ic22ca4a6b8d61c977979a5eb63a2e884dc4391bd
2016-06-06 13:35:04 -07:00
Reinhard Tartler 440acd0fa1 Add support for disable-strict-forbidden-file-verification
Enabling this option will allow an event to trigger a build if the event
contains BOTH one or more wanted file paths AND one or more forbidden
file paths.  In other words, with this option, the build will not get
triggered if the change contains only forbidden files, otherwise it will
get triggered.

Support for this was added in Plugin Version 2.16.0.

Change-Id: I860b076c2393909012c3ac9821559c9e8c9f7e28
2016-03-10 04:44:21 +00:00
James E. Blair 7ef05f7373 Add template-name as a variable that can be used in a template
In complex configurations it may be useful to have a template
print out its name so that a given job can be easily traced to
its definition.

Change-Id: I1cfed9c27a58b45ba48aeed04839bfc8f54a831e
2015-11-24 07:47:26 -08:00
Somay Jain cbf1f1b66a Support for more options in gerrit plugin and doc cleanup.
Following options are added -
* Other jobs on which this job depends
* Notification Level
* Unsuccessful Message File
* Silent Start Mode

Gerrit docstring cleanup for better indentation.

Change-Id: I2d0988973dcdd7ff32e7cdcd2c2676da3235e7fc
2015-06-29 18:59:41 +05:30
David Caro 54ab0713bf Added gerrit trigger missing options
it was missing the options to set the verified and code review values on
unstable, start and not built statuses.

Change-Id: Ia462d48efc645218281040ff38ab0f7c00e1859d
Signed-off-by: David Caro <dcaroest@redhat.com>
2015-04-19 21:58:58 +02:00
Igor Belikov 91aab94c1b Add 'readable-message' parameter to gerrit trigger
Adds ability to keep base64 encoded gerrit trigger
variables (such as commit message) in human readable
format.

Change-Id: Ie96d633ab9dc96dacf859409fd649bd981f9eb7c
2015-02-19 08:45:42 +03:00
Thanh Ha 7d44c58aa2 Update SCM Git Clean configuration to use new extensions style
Use the extensions style configuration for setting the SCM Git clean
configuration. With this format we deprecate the older (clean: bool)
configuration format and replace it with this format:

clean:
    after: bool
    before: bool

The older configuration is still supported so users who did not update
their YAML files can upgrade without updating all their YAML files first.

Change-Id: I1cfc0e2951c2b4de5e67bcb8abdf0b8c070e7fc6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2015-02-03 21:52:20 -05:00
Thanh Ha d7c37c89a8 Update SCM Wipe workspace to use extensions style
Use the newer extensions style configuration for the SCM Wipe workspace
option. This change simply changes the output style of this
configuration leaving the original YAML configuration values in tact so
it is backwards compatible with the old style configuration for
wipe-workspace setting.

While this patch still sets the old <wipeOutWorkspace> value long with
the new extensions value. Jenkins appears to be happy with both values
present and prefers the extensions format if it exists. This should
allow the older Jenkins that only supports the older config format to
continue to work.

Change-Id: Ib5b1809d19a35f83f524ee84b18f0c58b851c70b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
2015-02-03 21:49:57 -05:00
Kyle Rockman 009b362968 add support to git for changelog against branch
added support for another extension type, and fix how extensions are populated to xml

Change-Id: Ic9cf21a268d4ee3fb9b9efdee65c3d49e0cdb31e
Signed-off-by: Kyle Rockman <kyle.rockman@mac.com>
2014-11-21 08:14:37 -06:00
David Caro e0509e97d1 Added notbuilt-message option to gerrit trigger
It was not there for some reason, just added it.

Change-Id: Ica85183656a5cc8e427837efeb0b961f0633c74a
Signed-off-by: David Caro <dcaroest@redhat.com>
2014-10-31 18:29:40 +01:00
Christian Hofstaedtler 8999a87c13 Add support for 'ignore-notify' in git SCM
This option is named "Don't trigger a build on commit notifications"
in the Jenkins Web UI.

Change-Id: I338af61f8bfdef1545d1ea206e6874cda38957cd
2014-07-27 00:41:04 +02:00
Darragh Bailey 6d311095ef Fix ant builder definition in complete test
Change-Id: I8f6041c0aa2b7a24d2dc8ed73b2719c332b869e6
2014-06-21 21:57:27 +01:00
David Pursehouse aef2d27dce Add support for triggering on unreviewed patches
Since version 2.11.0 the Gerrit Trigger Plugin can be configured to
generate patchset-created events for changes that were uploaded while
the connection to Gerrit was down.

Change-Id: I59608e4f01355944fed9e44b288fc25a897950c7
2014-05-12 06:59:20 +00:00
David Pursehouse 3d1f134b45 Add support for multiple Gerrit servers in Gerrit trigger
Since version 2.11.0 the Gerrit Trigger Plugin can be configured
to trigger on more than one server.

Change-Id: I2082c5cfd14cd2494e2a7192beeb4909552cb7f6
2014-04-21 09:27:17 +09:00
Darragh Bailey b6784fcf6d Add tests for YamlParser and patch 2.6 minidom
Test full build job XML produced by the YamlParser object which exposed
differences in how the XML was being written on python 2.6 versus newer
versions of python.

Differences were whitespace only, but made testing and validating the
xml outputted across multiple versions of python difficult.

Code now patches the python 2.6 writexml method on the Element class in
the xml.dom.minidom module, with a version of the method taken from
python 2.7.5.

Removed the now obsolete regex that was reformatting the output on
python 2.6.

Change-Id: I26c100b6adfbcb9b197bb06cd162855adaaf24c5
2014-01-26 17:02:51 +11:00