diff --git a/.cloudbees.md b/.cloudbees.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/.jenkins/artifacts.lst b/.jenkins/artifacts.lst deleted file mode 100644 index eeb203859..000000000 --- a/.jenkins/artifacts.lst +++ /dev/null @@ -1,2 +0,0 @@ -**/target/*.hpi -**/target/*.jar \ No newline at end of file diff --git a/.jenkins/junit.lst b/.jenkins/junit.lst deleted file mode 100644 index bc5a061a6..000000000 --- a/.jenkins/junit.lst +++ /dev/null @@ -1 +0,0 @@ -**/target/surefire-reports/*.xml \ No newline at end of file diff --git a/README.md b/README.md index aa0dbc179..f0cd014ee 100644 --- a/README.md +++ b/README.md @@ -18,27 +18,19 @@ Each job can be configured with one Gerrit server. - sandell.robert@gmail.com * Tomas Westling - - tomas.westling@sonymobile.com + - tomas.westling@axis.com ## Community Resources - * [Wiki](https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger) + * [Homepage and documentation](https://plugins.jenkins.io/gerrit-trigger) * [Open Issues](http://issues.jenkins-ci.org/secure/IssueNavigator.jspa?mode=hide&reset=true&jqlQuery=project+%3D+JENKINS+AND+status+in+%28Open%2C+%22In+Progress%22%2C+Reopened%29+AND+component+%3D+%27gerrit-trigger-plugin%27) * [Mailing Lists](http://jenkins-ci.org/content/mailing-lists) # Environments -* `linux` - * `java-1.8` - * `maven-3.3.3` - -* Java 8: needed development environment. - -You should have no problem running the plugin on a Windows server. The maintainers' development, tests and production environments are Ubuntu so we have no means of detecting or fixing any Windows issues. -Java 6 compatibility will be dropped as soon as newer core version is needed for features. # Build @@ -60,17 +52,6 @@ Run checkstyle mvn checkstyle:checkstyle -# Test local instance - -To test in a local Jenkins instance - - mvn hpi:run - -# Clean test environment - - mvn clean - rm /tmp/jenkins-testkey* hostkey.ser # Needed when changing SSH components versions - # License The MIT License diff --git a/docs/CHANGELOG.old.adoc b/docs/CHANGELOG.old.adoc new file mode 100644 index 000000000..0612b2b04 --- /dev/null +++ b/docs/CHANGELOG.old.adoc @@ -0,0 +1,1002 @@ += Change Log + +Newer versions are in https://github.com/jenkinsci/gerrit-trigger-plugin/releases[GitHub Releases]. + +=== Version 2.30.0 (released Aug 02 2019) + +* https://issues.jenkins-ci.org/browse/JENKINS-54509[JENKINS-54509] - +Add check description is null then set description to "" +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/399[#399]) +* EventFilter - Add capability to modify which events are interesting +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/397[#397]) +* PlaybackManager - Persist to XML in a thread +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/398[#398]) + +=== Version 2.29.0 (released Feb 15 2019) + +* Java 8 and Jenkins 1.121 +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/389[#389], https://github.com/jenkinsci/gerrit-trigger-plugin/pull/390[#390]) +* Support triggering for wip-state-changed and private-state-changed +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/383[#383]) +* Start the trigger in a known state when using a dynamic configuration +URL (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/350[#350]) +* https://issues.jenkins-ci.org/browse/JENKINS-55262[JENKINS-55262] - +Missing content-type on serverStatuses REST API +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/388[#388]) + +=== Version 2.28.0 (released Dec 19 2018) + +* Make filtering out gerrit user's comments configurable +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/384[#384]) +* Clean up some eclipse warnings +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/386[#386]) +* Fix the synchronisation block in gerritEvent() +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/382[#382]) +* Fix problem with static access to SimpleDateFormat +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/381[#381]) +* skip updating the dynamic configuration if jobs are disabled +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/380[#380]) +* Update documentation to link to latest major Gerrit release +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/379[#379]) +* Improve logging in GerritPluginChecker +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/378[#378]) + +=== Version 2.27.7 (released Sep 3 2018) + +* Assure the connection get closed after check. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/375[#375]) +* _Upgrade animal-maven-sniffer-plugin to 1.17 +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/377[#377])_ +* _Diagnostics: Remove redundant 'unused' suppressions +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/376[#376])_ + +=== Version 2.27.6 (released Aug 24 2018) + +* Fix typo in javadoc +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/371[#371]) +* Null check getConfigXml() +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/369[#369]) +* Also specifiy a tag when using the SSH API +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/368[#368]) +* Add autogenerated prefix to the jenkins-gerrit-trigger tag +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/366[#366]) +* Fix race condtion in ssh key generation +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/362[#362]) +* Remove jobs from all memory entities +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/352[#352]) +* https://issues.jenkins-ci.org/browse/JENKINS-49813[JENKINS-49813] - +RunningJobs: Remove extra shouldCancelPatchsetNumber check +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/356[#356]) +* Clean runningJob class from stupid mistakes +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/357[#357]) +* Add proxy to avoid too much connections +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/353[#353]) + +=== Version 2.27.5 (released Feb 26 2018) + +* https://jenkins.io/security/advisory/2018-02-26/[Fix security issue] + +=== Version 2.27.4 (released Feb 20 2018) + +* Bumped Gerrit Events library to 2.12.0 to fix a json-lib version +conflict with Jenkins core +* Optimized event processing a bit +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/355[#355]) +* https://issues.jenkins-ci.org/browse/JENKINS-39498[JENKINS-39498] - +Stop panicking about "eventCreatedOn" and losing my position +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/346[#346]) +* https://issues.jenkins-ci.org/browse/JENKINS-48622[JENKINS-48622] +  Reduced logging spam from GerritMissedEventsPlaybackEnabledChecker +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/349[#349]) + +=== Version 2.27.3 (released Jan 26 2018) + +* Fixed some NullPointerExceptions and other code fixes +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/342[#342], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/344[#344], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/345[#345]) +* Fixed a race condition +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/340[#340]) +* UI Fixes and tweaks +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/341[#341], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/347[#347]) +* https://issues.jenkins-ci.org/browse/JENKINS-49163[JENKINS-49163] Create +correct url in Diagnotic Event Listeners report for jobs located in +folders +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/348[#348]) + +=== Version 2.27.2 (released Jan 15 2018) + +* https://issues.jenkins-ci.org/browse/JENKINS-48943[JENKINS-48943] +Whitelist gerrit-events and workaround missing collections whitelisting +in core for Jenkins 2.102+ +(https://github.com/jenkinsci/gerrit-trigger-plugin/commit/93a771948044fab506b5666ad6778b9636cd9f2c93a7719[93a7719], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/343[pull #343])  +* Fix loose forbidden file +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/339[pull #339]) + +=== Version 2.27.1 (released Dec 06 2017) + +* Fixed https://issues.jenkins-ci.org/browse/JENKINS-39498[JENKINS-39498] (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/335[pull +#335]) +* Fixed https://issues.jenkins-ci.org/browse/JENKINS-48155[JENKINS-48155] (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/336[pull +#336]) +* Reduce memory +usage (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/337[pull +#337]) + +=== Version 2.27.0 (released Dec 01 2017) + +* Provide the data about parent builds as environment variable to the +dependent +build (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/319[pull +#319]) +* Fixed a race condition with dynamic config refresh interval +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/334[pull #334]) +* Fix the deadlock in +RunningJobs (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/333[pull +#333]) + +=== Version 2.26.2 (released Oct 30 2017) + +* Expand parameters in build +messages (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/331[pull +#331]) +* Reduced item lookup calls to save memory and performance +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/332[pull #332]) + +=== Version 2.26.1 (released Oct 12 2017) + +* [.js-issue-title]#Abort ongoing builds of topic if new change to the +same topic was +submitted (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/326[pull +#326], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/328[#328])# +* Fixed a ConcurrentModificationException in +TriggerContextConverter (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/327[pull +#327]) +* Fixed https://issues.jenkins-ci.org/browse/JENKINS-20808[JENKINS-20808] +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/307[pull #307]) +* Fixed link to the job in memory report +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/329[pull #329]) +* https://issues.jenkins-ci.org/browse/JENKINS-39132[JENKINS-39132] No +comments to Gerrit 2.13.1 for Change Merged +trigger (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/330[pull +#330]) + +=== Version 2.26.0 (released Sep 13 2017) + +* [.js-issue-title]#Added support for Topic Changed event +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/324[pull +#324])# +* Fixed a deadlock in `+DependencyQueueTaskDispatcher+` +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/325[pull #325]) + +=== Version 2.25.0 (released Aug 11 2017) + +* Support sending multi-line comments +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/316[pull #316]) +* https://issues.jenkins-ci.org/browse/JENKINS-45095[JENKINS-45095] Fix +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/320[pull #320]) +* Added extra help text for regular expression matching +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/321[pull #321]) +* https://issues.jenkins-ci.org/browse/JENKINS-44568[JENKINS-44568], https://issues.jenkins-ci.org/browse/JENKINS-44414[JENKINS-44414] Fix +(g-e _https://github.com/sonyxperiadev/gerrit-events/pull/68[pull +#68], _https://github.com/sonyxperiadev/gerrit-events/pull/67[pull +#67]__) + +=== Version 2.24.0 (released Jul 3 2017) + +* https://issues.jenkins-ci.org/browse/JENKINS-43904[JENKINS-43904] Set +tag for review comments on REST +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/317[pull #317]) +* Fixed some logging in +GerritDynamicUrlProcessor (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/315[pull +#315]) + +=== Version 2.23.3 (released Jun 9 2017) + +* https://issues.jenkins-ci.org/browse/JENKINS-39010[JENKINS-39010] +Interpret the incoming comment message as multi-line +text (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/312[pull +#312]) +* https://issues.jenkins-ci.org/browse/JENKINS-40965[JENKINS-40965] Get +out of gerrit event stream loop in illegal state +(https://github.com/sonyxperiadev/gerrit-events/pull/62[g-e pull #62]) +* https://issues.jenkins-ci.org/browse/JENKINS-38542[JENKINS-38542] NPE +when canceling a task when no job +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/314[pull #314]) + +=== Version 2.23.2 (released Apr 19 2017) + +* Update Gerrit documentation links to latest major release +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/311[pull #311]) +* Fix CommentAdded event for Gerrit snapshot version < 2.13 +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/310[pull #310]) + +=== Version 2.23.1 (released Apr 11 2017) + +* https://issues.jenkins-ci.org/browse/JENKINS-40059[JENKINS-40059] - +CommentAdded trigger firing on every comment +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/302[pull #302], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/309[pull #309]) +* Display full commit message in tooltip +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/306[pull #306]) +* Change Nr. is a link to review detail +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/305[pull #305]) +* Prevent double HTML escaping of subject in search results +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/304[pull #304]) +* https://github.com/sonyxperiadev/gerrit-events/issues/59[#59] Bumped +Gerrit Events to version 2.10.1 to fix an buffer issue for incoming +JSON. + +=== Version 2.23.0 (released Nov 25 2016) + +* https://issues.jenkins-ci.org/browse/JENKINS-38675[JENKINS-38675] Use +refspec instead of branch name for the revision +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/299[pull #299]) +* Diagnostics pages: Management pages to get some diagnostics views into +the internals of the trigger. Usable to troubleshoot why some strange +behaviours are happening, with +https://wiki.jenkins.io/display/JENKINS/Support+Core+Plugin[Support Core +Plugin] reports. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/275[pull #275]) +* https://issues.jenkins-ci.org/browse/JENKINS-38974[JENKINS-38974] fill +in commentTextParameterMode if it's missing +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/301[pull #301]) + +=== Version 2.22.0 (released Aug 17 2016) + +*_This version does not contain the changes in 2.22.0-beta-1, they will +be incorporated at a later date_* + +* Prepare for git client plugin 2.0.0 coexistence with 1.x +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/296[pull +#296])_ +* Operator '^' for dynamic trigger must be escaped in regex +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/294[pull #294]) +* https://issues.jenkins-ci.org/browse/JENKINS-30821[JENKINS-30821] - +Add comment-added comment as job parameter +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/295[pull #295]) + +=== Version 2.22.0-beta-1 (released Jul 06 2016) + +* https://issues.jenkins-ci.org/browse/JENKINS-36139[JENKINS-36139] +Adapt Git BuildChooser to JGit4, introduced in Git Plugin 3.0.0-beta1 +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/291[pull #291]) + +=== Version 2.21.1 (released Jun 07 2016) + +* https://issues.jenkins-ci.org/browse/JENKINS-35364[JENKINS-35364] +Fixed a ClassNotFound due to the use of wrong StringUtils +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/286[pull #286]) +* https://issues.jenkins-ci.org/browse/JENKINS-35389[JENKINS-35389] +Fixed Jenkins getting wrong certificate if Gerrit is running with nginx +reverse proxy and nginx configured to run multiple https sites. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/287[pull #287]) + +=== Version 2.21.0 (released May 30 2016) + +* https://issues.jenkins-ci.org/browse/JENKINS-34753[JENKINS-34753] - +Provide safe parameters to ParametersAction to fix regression from +https://issues.jenkins-ci.org/browse/SECURITY-170[SECURITY-170], +requires Jenkins >= 2.6 +https://github.com/jenkinsci/jenkins/pull/2353[or equivalent] +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/285[pull #285]) +* https://issues.jenkins-ci.org/browse/JENKINS-23873[JENKINS-23873] - +Provide GERRIT_MERGED_REVISION after change-merged event +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/284[pull #284]) +* Changed to new plugin parent pom structure +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/281[pull #281]) +* Set Notification level on the build started trigger as well to silence +some of the output +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/282[pull #282]) + +=== Version 2.20.0 (released Apr 12 2016) + +* Added https://wiki.jenkins.io/display/JENKINS/Structs+plugin[Structs +plugin] Symbol annotations for concise DSL syntax +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/280[pull #280]) +* Fixed the "updated" check on Comment-added events introduced in 2.17.0 +to look at the correct "oldValue" property instead +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/279[pull #279]) + +=== Version 2.19.0 (released Mar 31 2016) + +* https://issues.jenkins-ci.org/browse/JENKINS-26103[Partial +JENKINS-26103] +https://wiki.jenkins.io/display/JENKINS/Pipeline+Plugin[Pipeline] step +to customise the post back data. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/274[pull #274]) +* Guard against potential crash on core versions where +https://issues.jenkins-ci.org/browse/JENKINS-33467[JENKINS-33467] is +fixed, i.e. >= https://jenkins.io/changelog/[1.653] +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/274[pull #274]) + +=== Version 2.18.4 (released Mar 09 2016) + +* https://issues.jenkins-ci.org/browse/JENKINS-30857[JENKINS-30857] +Fixed Java 1.6 compatibility issue due to introduction of +ReflectiveOperationException. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/276[pull #276]) +* Also added animal sniffer to the plugin's build test phase to try to +avoid the above problem in the future. _(But you shouldn't be running +Java 1.6 anyway, we will soon move away from it...)_ + +=== Version 2.18.3 (released Jan 05 2016) + +* https://issues.jenkins-ci.org/browse/JENKINS-31800[JENKINS-31800] +Fixed projectListRefreshInterval zero value after upgrade from 2.13.0 to +2.14.0. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/273[pull #273]) + +=== Version 2.18.2 (released Dec 11 2015) + +* Renamed review category deprecated default names CRVW and VRIF for new +server configs (should have been done 2 years ago). +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/270[pull #270]) +* https://issues.jenkins-ci.org/browse/JENKINS-31894[JENKINS-31894] +Fixed problem where approvals were not displayed in Query and Trigger +search results. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/272[pull #272]) + +=== Version 2.18.1 (released Dec 3 2015) + +* https://issues.jenkins-ci.org/browse/JENKINS-31858[JENKINS-31858] +Fixed "Enable project Auto Completion" checkbox save. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/268[pull #268]) + +=== Version 2.18.0 (released Dec 1 2015) + +* Changed the way "compound name and email" and +GERRIT_CHANGE_COMMIT_MESSAGE (a.k.a "Readable message") parameters are +configured. + +Users can now select between three modes: "Human readable", Encoded and +"Do not add". With the same defaults as the old checkboxes. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/258[pull #258]) +* Added the same mode configuration for the GERRIT_CHANGE_SUBJECT +parameter. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/265[pull #265]) + +=== Version 2.17.5 (released Nov 30 2015) + +* https://issues.jenkins-ci.org/browse/JENKINS-30370[JENKINS-30370] +Fixed Config Page Auth validation +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/263[pull #263]) +* Limit maximum tryLoadProjectList wait time to 64 seconds +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/264[pull #264]) + +=== Version 2.17.4 (released Nov 27 2015) + +* https://issues.jenkins-ci.org/browse/JENKINS-31473[JENKINS-31473] +Project list is not updating in desired interval +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/260[pull #260]) +* https://issues.jenkins-ci.org/browse/JENKINS-30975[JENKINS-30975] +Protect PlaybackManager from null EventCreatedOn +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/261[pull #261]) +* https://issues.jenkins-ci.org/browse/JENKINS-31781[JENKINS-31781] +build completed for RefUpdated events with REST +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/262[pull #262]) + +=== Version 2.17.3 (released Nov 26 2015) + +* https://issues.jenkins-ci.org/browse/JENKINS-31439[JENKINS-31439] +Correct Missed Events Playback manager initialisation +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/259[pull #259]) + +=== Version 2.17.2 (released Oct 29 2015) + +* Fix NPE involving null server CR/Ver labels +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/257[pull #257]) + +=== Version 2.17.1 (released Oct 28 2015) + +* https://issues.jenkins-ci.org/browse/JENKINS-31199[JENKINS-31199] Fix +for REST API Build Completed with Locked Down instance +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/256[pull #256]) + +=== Version 2.17.0 (released Oct 26 2015) + +* Update for upcoming change to Gerrit stream events in regards to +*updated* attribute in Approval for responding to Comment Added events +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/253[pull #253]) + +* https://issues.jenkins-ci.org/browse/JENKINS-30367[JENKINS-30367], https://issues.jenkins-ci.org/browse/JENKINS-30393[JENKINS-30393] +Allow override of code-review/verified value from job +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/255[pull +#255]) + +_This change also makes it so Jenkins doesn't send_ *_--verified_* _at +all for the review ssh command, if there is no value calculated, so if +you change the defaults you shouldn't need to add the Verified label in +Gerrit._ + +=== Version 2.16.0 (released Oct 02 2015) + +* https://issues.jenkins-ci.org/browse/JENKINS-30620[JENKINS-30620] +Option to permit disable Strict Forbidden files +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/252[pull #252]) + +=== Version 2.15.2 (released Sept 30 2015) + +* Fix to permit use of Forbidden files without File Paths +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/251[pull #251]) + +=== Version 2.15.1 (released Sept 14 2015) + +* Some Code clean-up +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/242[pull #242], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/243[pull #243], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/244[pull #244], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/245[pull #245], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/246[pull #246], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/248[pull #248]) +* Added Backwards compatibility tests for updated RefUpdated event in +Gerrit 2.12 +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/249[pull #249]) +* https://issues.jenkins-ci.org/browse/JENKINS-12690[JENKINS-12690] Fix +Issue with AES pass phrase encryption of keys +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/250[pull #250]) + +=== Version 2.15.0 (released Aug 31 2015) + +2.15.0-beta-1 promoted to stable + +=== Version 2.15.0-beta-1 (released Aug 17 2015) + +* https://issues.jenkins-ci.org/browse/JENKINS-26010[JENKINS-26010] +Added support for triggering +https://wiki.jenkins-ci.org/display/JENKINS/Workflow+Plugin[Workflow +Jobs]. (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/240[pull +#240]) + +=== Version 2.14.0 (released Jun 05 2015) + +2.14.0-beta-3 promoted to stable + +=== Version 2.14.0-beta-3 (released May 27 2015) + +* Correct Typo in Messages for Playback Warning +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/237[pull #237]) +* https://issues.jenkins-ci.org/browse/JENKINS-28583[JENKINS-28583] +Improve backwards compatibility of Project Lister +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/239[pull #239]) + +=== Version 2.14.0-beta-2 (released May 26 2015) + +* Correct default values for Build Current Patchsets +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/236[pull #236]) + +=== Version 2.14.0-beta-1 (released May 20 2015) + +* Fixed the BRANCH build parameter and added TOPIC +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/205[pull #205]) +* Always trigger upon manually triggered build +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/216[pull #216]) +* Support configuration of when and how the project list for auto +completion is fetched +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/220[pull #220], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/225[pull #225]) +* Added incremental update of project list for users of Gerrit 2.12 +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/227[pull #227]) +* Cleaned up some code +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/207[pull #207], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/221[pull #221], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/222[pull #222], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/223[pull #223], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/232[pull #232]) +* Fix for "Build Current Patches Only" +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/215[pull #215]) +* Workaround for +https://issues.jenkins-ci.org/browse/JENKINS-17116[JENKINS-17116] +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/224[pull #224]) +* Superficial fix for +https://issues.jenkins-ci.org/browse/JENKINS-28161[JENKINS-28161] +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/226[pull #226]) +* https://issues.jenkins-ci.org/browse/JENKINS-23871[JENKINS-23871] +Removed Unreviewed Patches feature in favour of Missed Events Playback +on re-connect +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/213[pull #213], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/228[pull #228], +https://github.com/jenkinsci/gerrit-trigger-plugin/pull/229[pull #229]) + +=== Version 2.13.0 (released Apr 24 2015) + +2.13.0-beta-6 promoted to stable. + +=== Version 2.13.0-beta-6 (released Apr 7 2015) + +* https://issues.jenkins-ci.org/browse/JENKINS-27651[JENKINS-27651] +Rename issue. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/218[pull #218]) + +=== Version 2.13.0-beta-5 (released Feb 23 2015) + +* Another regression from +https://issues.jenkins-ci.org/browse/JENKINS-23152[JENKINS-23152]. The +correct event handling methods wasn't called for some event types +causing weird loop-triggering behavior. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/204[pull #204]) + +=== Version 2.13.0-beta-4 (released Feb 16 2015) + +* Another regression from +https://issues.jenkins-ci.org/browse/JENKINS-23152[JENKINS-23152] fix; +Gerrit notifier threads should impersonate SYSTEM +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/202[pull #202]) +* Regression from previous Base64EncodedString parameter fix +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/203[pull #203]) +* Updated com.jcraft.jsch to 0.1.51 +(https://github.com/sonyxperiadev/gerrit-events/pull/32[gerrit-events +pull #32]) + +=== Version 2.13.0-beta-3 (released Feb 6 2015) + +* Enabled Base64EncodedString parameter to be used with Rebuild plugin +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/190[pull #199]) +* Regression from +https://issues.jenkins-ci.org/browse/JENKINS-23152[JENKINS-23152] fix; +Running event threads as SYSTEM user +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/200[pull #200]) + +=== Version 2.13.0-beta-2 (released Jan 15 2015) + +_I Botched the beta-1 release._ + +* Silent Start +(https://github.com/jenkinsci/gerrit-trigger-plugin/commit/a50dbd590f9fa86155a331ed098efcd0be194466[Commit +#a50dbd5]) +* https://issues.jenkins-ci.org/browse/JENKINS-23152[JENKINS-23152] +Reload fixes. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/193[pull #193]) +* Build completed message builds sorted worse first. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/192[pull #192]) +* https://issues.jenkins-ci.org/browse/JENKINS-26323[JENKINS-26323] Fix +"Build Current Patches Only" by scanning for event. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/195[pull #195]) +* Removed unnecessary select server description. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/196[pull #196]) +* Findbugs: null pointer dereference fixes. +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/197[pull #197]) + +=== Version 2.12.0 (released Nov 14 2014) + +* 2.12.0-beta-5 promoted to stable +* Added Japanese translations +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/190[pull #190]) + +=== Version 2.12.0-beta-5 (released Oct 30 2014) + +Final rc for 2.12 + +* https://issues.jenkins-ci.org/browse/JENKINS-24445[JENKINS-24445] +Don't trigger builds triggered by the same event +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/172[pull #172]) +* https://issues.jenkins-ci.org/browse/JENKINS-24575[JENKINS-24575] +Don't keep Extension instances +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/175[pull #175]) +* https://issues.jenkins-ci.org/browse/JENKINS-19013[JENKINS-19013] Fix +session management in manual trigger page +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/176[pull #176]) +* Provide notification level to gerrit command +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/177[pull #177]) +* https://issues.jenkins-ci.org/browse/JENKINS-24295[JENKINS-24295] Add +one-off executor to search list for cancel job +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/178[pull #178]) +* Fix topic rule for empty topic +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/179[pull #179]) +* https://issues.jenkins-ci.org/browse/JENKINS-21407[JENKINS-21407] +Change manual trigger button to floating button +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/180[pull #180]) +* https://issues.jenkins-ci.org/browse/JENKINS-21064[JENKINS-21064] +Include the latest patchset only in manual trigger page +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/182[pull #182]) +* https://issues.jenkins-ci.org/browse/JENKINS-21064[JENKINS-21064] Only +send selected change data back to the server +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/183[pull #183]) +* Use newRev for building on RefUpdated event +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/184[pull #184]) +* https://issues.jenkins-ci.org/browse/JENKINS-25047[JENKINS-25047] Fix +DraftPublished and ChangeMerged -> Replication +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/185[pull #185]) +* https://issues.jenkins-ci.org/browse/JENKINS-25047[JENKINS-25047] +Reschedule inflight pushes and help improvements for draft published +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/188[pull #188]) +* Add support for remote API +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/186[pull #186]) + +=== Version 2.12.0-beta-4 (released Aug 28 2014) + +* Fixed disabled features not showing +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/164[pull #164]) +* https://issues.jenkins-ci.org/browse/JENKINS-24012[JENKINS-24012] +Fixed an issue with RabbitMQ +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/166[pull #166]) +* Added No connection on startup +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/168[pull #168]) +* Added selection for what labels to use for the REST API +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/169[pull #169]) +* Default "status:open" filled in on the search page +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/163[pull #163]) +* Added a trigger for comment added containing a specified RegEx +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/170[pull #170]) + +=== Version 2.12.0-beta-3 (released Jun 30 2014) + +Still calling it beta since I haven't had time o test it in a staging +environment yet. + +==== Features and Fixes + +* Added option to exclude drafts when triggering on patchset created +event (https://github.com/jenkinsci/gerrit-trigger-plugin/pull/153[pull +#153]) +* Permit the setting of Build Schedule Delay to "0". _Delay not needed +with Replication Events_ +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/143[pull #143]) +* Bug: Copy REST API settings when creating new server +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/156[pull #156]) +* Bug: Password for SSH authentication file is now encrypted +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/157[pull #157]) +* https://issues.jenkins-ci.org/browse/JENKINS-23165[JENKINS-23165] +Don't send plain text password to browser +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/158[pull #158]) +* https://issues.jenkins-ci.org/browse/JENKINS-23421[JENKINS-23421] Add +custom parameter type for Base64 encoded value +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/160[pull #160]) +* Filter on change-kind in patchset-created _REWORK, TRIVIAL_REBASE, +NO_CODE_CHANGE_ +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/159[pull #159]) +* Removed delayed approval feature +https://issues.jenkins-ci.org/browse/JENKINS-11409[JENKINS-11409] +(https://github.com/jenkinsci/gerrit-trigger-plugin/commit/48311691d693d0935030491b0a4ba8277c9e0396[commit +48311]) + +=== Version 2.12.0-beta-2 (released Apr 28 2014) + +==== Features and Fixes + +* Lowered logging level when builds are completed +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/147[pull #147]) +* https://issues.jenkins-ci.org/browse/JENKINS-22813[JENKINS-22813] Git +plugin is now optional in practice +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/148[pull #148]) +* https://issues.jenkins-ci.org/browse/JENKINS-22814[JENKINS-22814] +Lowered a startup log message +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/149[pull #149]) +* Support for receiving Gerrit events from RabbitMQ via +https://wiki.jenkins-ci.org/display/JENKINS/RabbitMQ+Consumer+Plugin[RabbitMQ +Consumer Plugin] +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/151[pull #151]) +* Fix for non negative replication cache timeout +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/150[pull #150]) +* Support for review notification levels +(https://github.com/jenkinsci/gerrit-trigger-plugin/pull/152[pull #152]) + +=== Version 2.12.0-beta-1 (released Apr 28 2014) + +Bumped core dependency to 1.509.3 + +==== Features and Fixes + +* Code refactoring to "break out" the gerrit-events module into its own +https://github.com/sonyxperiadev/gerrit-events[separate project]. +* Added a "Forbidden Files" optional parameter to Gerrit Projects +(https://github.com/jenkinsci/gerrit-trigger-plugin/commit/4337255ba9c272ed668ca71c632c486119a1aaf4[commit +43372]) +* https://issues.jenkins-ci.org/browse/JENKINS-11409[JENKINS-11409] +Delayed approval mechanism +(https://github.com/jenkinsci/gerrit-trigger-plugin/commit/5f672f2db13314377c9db239bdb6ae4491136345[commit +5f672]) +* Add Pseudo Mode to server configuration +(https://github.com/jenkinsci/gerrit-trigger-plugin/commit/0e735d659533bf6331a40fe42449be5ecca0ed6c[commit +0e735]) +* NPE Fix in the connection watchdog +* Fixed log annotator when "Any Server" was used. +(https://github.com/jenkinsci/gerrit-trigger-plugin/commit/f8e50a297e9a00551928abfcf66df18bcea180ad[commit +f8e50]) +* Moved "Server Control Panel" to main Management page +* Feature to block build until Gerrit replication is completed. +(https://github.com/jenkinsci/gerrit-trigger-plugin/commit/ab429cf8f154995c1def119940f22dc18f71be57[commit +ab429]) +* https://issues.jenkins-ci.org/browse/JENKINS-21547[JENKINS-21547] Add +information to console log +* New functionality allowing one project's trigger to depend on others'. +(https://github.com/jenkinsci/gerrit-trigger-plugin/commit/08fb5a2be7036934a37af1b39c5ca535c5f37850[commit +08fb5]) +* Various doc and help fixes +* Add option for selecting non-encoded string for multiline text +parameters. +(https://github.com/jenkinsci/gerrit-trigger-plugin/commit/cb2858cc62295877c16745b30e1c27a1eb0cf4b4[commit +cb285]) + +=== Version 2.11.1 (released Mar 21 2014) + +* Fixed https://issues.jenkins-ci.org/browse/JENKINS-22155[JENKINS-22155] + +=== Version 2.11.0 (released Jan 14 2014) + +2.11.0-beta-4 promoted to "stable". + +=== Version 2.11.0-beta-4 (released Dec 18 2013) + +_Last release for the year._ + +==== Fixes + +* http://issues.jenkins-ci.org/browse/JENKINS-21067[JENKINS-21067] New +server config not reachable if using a prefix in URL + +=== Version 2.11.0-beta-3 (released Dec 16 2013) + +==== Fixes + +* One more "Any Server" fix. +* small jelly fix to make the trigger work like before with the +templates plugin. + +=== Version 2.11.0-beta-2 (released Dec 9 2013) + +==== Fixes + +* URL encoding for project and branch when calling the REST Api +* Updated the Gerrit documentation link on the query page to point to +2.8 +* Various fixes for using the "Any Server" trigger option. + +=== Version 2.11.0-beta-2 (released Dec 9 2013) + +==== Fixes + +* URL encoding for project and branch when calling the REST Api +* Updated the Gerrit documentation link on the query page to point to +2.8 +* Various fixes for using the "Any Server" trigger option. + +=== Version 2.11.0-beta-1 (released Nov 26 2013) + +This version contains a lot of refactoring under the hood to make some +of the features and future work possible. + +==== Features + +* [http://issues.jenkins-ci.org/browse/JENKINS-17850[JENKINS-17850]] +Multiple Gerrit server support +* Option to use REST Api for submitting review +** Allowing other plugins to provide line comments via extension point +* Option to check changes from Gerrit and trigger missed patchsets. +* The change's full commit message is available in triggered jobs, if +Gerrit provides it. +* New build parameter: GERRIT_TOPIC. + +==== Fixes + +* Replaced deprecated `gerrit approve` with `gerrit review` as default +command. +* [http://issues.jenkins-ci.org/browse/JENKINS-10709[JENKINS-10709]] +Multiple builds are triggered for one change in Gerrit. +* Fixed an NPE in Watchdog causing the days not to show in the config UI +* Git choosing strategy no longer uses FETCH_HEAD but the actual +revision instead +* [http://issues.jenkins-ci.org/browse/JENKINS-20098[JENKINS-20098]] When +computing the changelog in the +https://wiki.jenkins.io/display/JENKINS/Git+Plugin[Git Plugin] using +GerritTriggerBuildChooser an UnsupportedOperationException is thrown + +=== Version 2.10.1 (released June 17, 2013) + +==== Fixes + +* Fixed NPE on "Query and Trigger Gerrit Patches".  +* Connection to Gerrit is delayed during startup until all jobs are +loaded. + +=== Version 2.10.0 (released May 30, 2013) + +==== Features and Fixes + +* Added Retrigger permission.  +** Anyone with Build permission will also have Retrigger so you won't +need to change the authorization config. +** Gives you the ability to deny people to build a job but retrigger it +if for example some environment issue broke the build. +* Japanese translations for the things added in 2.9.0 + +=== Version 2.9.0 (released Mar 12, 2013) + +==== Features and Fixes + +* Added a watchdog that can restart the Gerrit connection if nothing has +happened for x minutes +* Fixed so that a reconnect is attempted if connection gets broken +before stream-events is fully initiated. +* SOCS5 and HTTP proxy support for connecting to Gerrit +* Added new parameters:  +** GERRIT_EVENT_TYPE - states what type of event that triggered the +build +** GERRIT_CHANGE_ABANDONER_NAME, GERRIT_CHANGE_ABANDONER_EMAIL +** GERRIT_CHANGE_RESTORER_NAME, GERRIT_CHANGE_RESTORER_EMAIL + +=== Version 2.8.0 (released Feb 21, 2013) + +==== Features and Fixes + +* Trigger on change-abandoned and change-restored events. +* Configuration to turn off the compound email parameter - workaround +for parameter issues on Windows. +* URLConnection to the dynamic trigger config should now be properly +closed. +* Removed use of deprecated APIs in git-plugin's BuildChooser; follow up +fix to +https://issues.jenkins-ci.org/browse/JENKINS-16851[JENKINS-16851], new +dependency to git-plugin 1.2.0. + +=== Version 2.7.0 (released Dec 5, 2012) + +==== Features and Fixes + +* Custom messages from plugins takes into account all builds for an +event +* Custom messages from plugins moved from CUSTOM_MESSAGE into +BUILD_STATS variable, added a checkbox to turn on/off plugin messages. +* Ability to "skip voting" for a specific build result. +* Fixed a circularity bug in Comment Added event, so Jenkins won't +trigger on comments from itself. +* Upgraded jsch to 0.1.49 +* Build current patchsets only is no longer experimental +* More Japanese translations +* Fixes and additions to help files +* Added a timeout when fetching dynamic configuration files +* Bumped Jenkins core dependency to 1.424 + +==== Dev related + +* GerritCause is now a sub class of SCMTriggerCause +* Done some cleanups in the gerrit-event module +* checkstyle:check is executed in the maven test phase, so the build +will fail if you have checkstyle warnings. +* ToGerritRunListener now has an ordinal of 10 003 + +=== Version 2.6.0 (released Sep 19, 2012) + +==== Features and Fixes + +* Dynamic Gerrit triggering. +* Triggering on comment-added, change-merged, ref-updated and +draft-published now possible. +* Refactorization of GerritTriggeredEvents and hashCode method +implementation for events. +* Fixed a double-triggering when a project is renamed. +* New extension point for plugins to add custom messages to Gerrit at +beginning/end of build. +* https://issues.jenkins-ci.org/browse/JENKINS-11726[JENKINS-11726] +* https://issues.jenkins-ci.org/browse/JENKINS-11582[JENKINS-11582] +* https://issues.jenkins-ci.org/browse/JENKINS-10055[JENKINS-10055] + +=== Version 2.5.2 (released May 7, 2012) + +==== Features and Fixes + +* Corrected Gerrit version requirements for the "trigger on files" +feature, it is now set to 2.3. +* No quiet period when triggering builds manually (_Retrigger and "Query +and Trigger Gerrit Patches"_) +* Fixed a deadlock when a job is saved at the same time as its being +triggered. +* More Japanese translations. + +=== Version 2.5.1 (released Mar 13, 2012) + +==== Features and Fixes + +* JENKINS-12836 Follow-up from previous version. + +=== Version 2.5.0 (released Mar 8, 2012) + +==== Features and Fixes + +* Gerrit version checking. +** _The plugin fetches the version of Gerrit each time the connection to +Gerrit is started._ +** _This will be used to filter out functionality that is not available +in all Gerrit versions._ +** _If a snapshot of Gerrit is used, all functionality will be enabled +(as of today, only the file path triggering below uses the version +check)._ +* JENKINS-12836 Add a Descriptor for the Branch to avoid a warning in +the logs. +* Quiet Period. If a job has a configured quiet period; the trigger will +use that if it is larger than the global configuration for the trigger. +* File path triggering. +** _One or more file paths can now be entered in the config of a Jenkins +project, in the same way as Gerrit project/branch._ +** _The build will only trigger if the path is found in the patch set +for this project/branch._ +** _Useful for big gits with lots of smaller modules beneath it._ +* Custom message from workspace file. +** _A workspace file can now be updated with information that will be +sent in the message from the trigger to Gerrit._ + +=== Version 2.4.0 (released Feb 17, 2012) + +==== Features and Fixes + +* Custom URL per project. Each project can define what URL should be +provided in the information that is sent to Gerrit. +* JENKINS-11009 Silent Triggered builds now show up in the Manual +Trigger monitor panel. +* EXPERIMENTAL: Cancel old running jobs when a new Patch Set is uploaded +on the same change. +** _This feature is set as experimental due to problems we've found +during testing. _ +** _You can enable the feature from the Manage Jenkins/Gerrit Trigger +page._ +** _All help in debugging the problems we've found is appreciated, +that's why it is in this release. (The problems are described in the +comment section on GitHub_ +_https://github.com/jenkinsci/gerrit-trigger-plugin/pull/5[here])._ + +=== Version 2.3.1 (released Sep 14, 2011) + +==== Features and Fixes + +* Change owner and patch-set uploader as build parameters. +* http://issues.jenkins-ci.org/browse/JENKINS-7067[JENKINS-7067] Does +not attempt to connect to Gerrit if there is no configuration (first +start up) +* Compatible with git plug-in >= 1.1.10 +* Reload from disk and other duplication related bug-fixes. + +=== Version 2.3.0 (released Mar 31, 2011) + +This is built against Jenkins 1.400 to have an easier release process, +but it should still be binary compatible with Hudson 1.362+ + +==== Features and Fixes + +* http://issues.jenkins-ci.org/browse/JENKINS-7053[JENKINS-7053] Escape +quotes in build parameters +* http://issues.jenkins-ci.org/browse/JENKINS-8578[JENKINS-8578] Added +permission-setting to perform "Query and Trigger Gerrit Patches" +* http://issues.jenkins-ci.org/browse/JENKINS-8799[JENKINS-8799] +Administrator check for start/stop the Gerrit connection +* Ant pattern matching on Windows +* Allow custom build messages per job +* http://issues.jenkins-ci.org/browse/JENKINS-7207[JENKINS-7207] Teach +the trigger to understand merge commits. + +=== Version 2.2.0 (released Oct 7, 2010) + +====   New Features + +* Allow for searching and manual triggering of Gerrit Patches - **the +feature requires Gerrit version 2.1.4 or later**__, but can be +disabled__. +** *_Known bug:_* _when upgrading from previous release, the manual +trigger page is disabled by default. Goto the Gerrit Management page and +enable it under the advanced section._ +* Gerrit/GIT Project-name Autocompletion on trigger-config page. +* Multiple build's results are reported on separate lines to Gerrit +instead of "tab separated". +* Approve commands are queued on a separate thread-pool instead of +running on the last build's thread. + +=== Version 2.1.0 (released July 26, 2010) + +====   New Features + +* http://issues.jenkins-ci.org/browse/JENKINS-6818[JENKINS-6818] +Retrigger builds. The users has the ability to retrigger a build. A new +build with the same change info as the original build will be scheduled. + +====   Bugs fixed + +* http://issues.jenkins-ci.org/browse/JENKINS-6967[JENKINS-6967] Missing +default parameters. +* http://issues.jenkins-ci.org/browse/JENKINS-6977[JENKINS-6977] Images +and help don't load when Hudson isn't running on the root URL. +* Fixed some Leaking threads +* Japanese translation + +=== Version 2.0 (released July 5, 2010) + +* First release. diff --git a/docs/README.adoc b/docs/README.adoc new file mode 100644 index 000000000..7f1fd8a32 --- /dev/null +++ b/docs/README.adoc @@ -0,0 +1,438 @@ += Gerrit Trigger Plugin + +image:https://img.shields.io/jenkins/plugin/v/gerrit-trigger.svg[link="https://plugins.jenkins.io/gerrit-trigger"] +image:https://img.shields.io/github/release/jenkinsci/gerrit-trigger-plugin.svg?label=changelog[link="https://github.com/jenkinsci/gerrit-trigger-plugin/releases/latest"] +image:https://img.shields.io/jenkins/plugin/i/gerrit-trigger.svg?color=blue[link="https://plugins.jenkins.io/gerrit-trigger"] + +This plugin integrates Jenkins to +http://code.google.com/p/gerrit/[Gerrit code review] for triggering +builds when a "patch set" is created. + + +[NOTE] +==== +Older versions of this plugin may not be safe to use. Please review the +following warnings before using an older version: + + * https://jenkins.io/security/advisory/2018-02-26/#SECURITY-402[Unauthorized +access to some Gerrit Trigger server configuration] +* https://jenkins.io/security/advisory/2018-02-26/#SECURITY-403[Unauthorized +users were able to change Gerrit Trigger server configuration] +==== + +== Set Up + +=== Gerrit access rights + +. Create the profile through in _Gerrit web interface_ for your Jenkins +user, and set up a _SSH key_ for that user. +. Gerrit web interface > Admin > Groups > Non-Interactive Users > Add +your jenkins user. +. Admin > Projects > ... > Access > Edit +* Reference: `+refs/*+` +** *Read*: ALLOW for Non-Interactive Users +* Reference: `+refs/heads/*+` +** *Label Code-Review*: -1, +1 for Non-Interactive Users +** *Label Verified*: -1, +1 for Non-Interactive Users + +Gerrit documentation: +http://gerrit-documentation.googlecode.com/svn/Documentation/2.4.2/access-control.html#examples_cisystem + +*IMPORTANT:* On Gerrit 2.7+, you also need to grant "Stream Events" +capability. Without this, the plugin will not work, will try to connect +to Gerrit repeatedly, and will eventually cause OutOfMemoryError on +Gerrit. + +. Gerrit web interface > People > Create New Group : "Event Streaming +Users". Add your jenkins user. +. Admin > Projects > All-Projects > Access > Edit + +* {blank} +** *Global Capabilities* +*** *Stream Events:* ALLOW for Event Streaming Users + +https://gerrit-documentation.googlecode.com/svn/Documentation/2.7/access-control.html#capability_streamEvents + +=== Administrative Settings + +Specify the Gerrit server settings via "Manage Jenkins > Gerrit Trigger" + +Fill in the server settings: + +image:images/server-settings.png[Server settings] + +Click "Test Connection" to verify the connection. + +When everything seems ok, save your settings and restart the connection +in the "Control" section at the bottom of the page: + +image:images/trigger-server-control.png[server control] + +There are many more settings for your pleasure, look at the individual +help sections for information what they are about. + +=== Trigger Configuration + +In the "Build Triggers" section of your Job configuration page; tick +"Gerrit event": + +image:images/gerritconf.PNG[Job trigger configuration] + +Specify what type of event(s) to trigger on: + +* *Draft Published:* Sent when a change moves from draft state to new. +(only available in version 2.5 or higher of Gerrit). +* *Patchset Created:* Sent when a new patchset arrives on a change. +Before version 2.6.0, this was the only event you could trigger on. +* *Change Merged:* Sent when a change is merged on the Gerrit server. +* *Comment Added:* Sent when a comment is added to a change. Which +category and value to trigger on can be configured. The available +categories can be configured in the server settings for the plugin. +* *Ref Updated:* Sent when a ref is updated on the Gerrit server, i.e. +someone pushes past code review. + +_If you don't specify any event; Patchset Created and Draft Published +(if available) will be selected by default._ + +image:images/commentadded.PNG[Comment added configuration] +_Comment added configuration._ + +Specify what Gerrit project(s) to trigger a build on. + +At least one project and branch pattern needs to be specified for a +build to be triggered,and you can specify as many gerrit project to +trigger on as you want. + +Start by specifying the name of the Gerrit project in the left hand text +field. + +You can specify the name pattern in three different ways, as provided by +the "Type" drop-down menu. + +* *Plain:* The exact name in Gerrit, case sensitive equality. + +* *Path:* http://ant.apache.org/manual/dirtasks.html#patterns[ANT style +pattern]. Ex: "***/base/**" + +* *RegExp:* +http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[Regular +expression]. + +Then provide the name of the branch(es) to trigger on. The same "pattern +types" is available as above. + +So for example to trigger on all branches in the project you can +specify: + +  Type: Path + +  Pattern: ** + +You can add more branch patterns by clicking on "Add Branch" and more +projects by clicking "Add Project". + +The same syntax works for specifying which file(s) to trigger on (this +is only available in version 2.3 or higher of Gerrit). + +==== Dynamic triggering + +From version 2.6.0 of the plugin, a new way of configuring what +projects, branches and files to trigger on is available. + +  +image:images/dynamictriggerconfig.PNG[Dynamic Trigger Configuration] +By checking the checkbox "Dynamic Trigger Configuration", the user is +asked for the URL to a file. + +On a set interval, the plugin fetches and parses this file. The file +contents should follow this syntax: + +[source,syntaxhighlighter-pre] +---- +p=some/project +b^**/master/* +f~.*\.txt +p=some/other/project +b^** +---- + +Explanation: + +p for project + +b for branch + +f for file + += for plain syntax + +^ for ANT style syntax + +~ for regexp syntax + +Branch and file lines are assumed to be part of the closest preceding +project line. + +The dynamic triggering can be used in combination with the usual +configuration, described above. The gerrit trigger will + +trigger both for the dynamic and non-dynamic configurations. + +The interval on which Jenkins fetches the file is configurable in the +administrative pages for the Gerrit trigger, under advanced: + +image:images/refreshconfig.PNG[Dynamic trigger refresh] + +NOTE: Anonymous user must have READ permissions to Jobs in order for +this feature to work. + + +===== Use case + +The reason for this functionality is that a user would want to update a +list of what to trigger on outside of Jenkins. + +Another use case is to run a build in Jenkins periodically that creates +the list, then have several projects use the same list. + +===== *Gerrit hooks* + +Gerrit doesn't use the standard repository hooks.  To do an automatic +update of jenkins on a patch you'll need to add a hook to the top-level +gerrit hook directory ($site_path/hooks). + +The equivalent of a git 'post-receive' hook for gerrit is a +'patchset-created' handler.  More info on gerrit hooks can be found +here: + +http://gerrit.googlecode.com/svn/documentation/2.1.2/config-hooks.html + +=== Usage with the Git Plugin + +To get the Git Plugin to download your change; set Refspec to +*$GERRIT_REFSPEC* and the Choosing strategy to *Gerrit Trigger*. This +may be under ''Additional Behaviours/Strategy For Choosing What To +Build' rather than directly visible as depicted in the screenshot. You +may also need to set 'Branches to build' to *$GERRIT_BRANCH.* If this +does not work for you set Refspec to +*refs/changes/*:refs/changes/** and 'Branches to build' to +*$GERRIT_REFSPEC*. + +NOTE: Be aware that *$GERRIT_BRANCH* and *$GERRIT_REFSPEC* are not set +in the *Ref Updated* case. If you want to trigger a build, you can set +Refspec and 'Branches to build' to *$GERRIT_REFNAME*. + +image:images/git_config.png[Git Configuration] + +=== Usage with Repo + +If you are using a freestyle project and repo to download your code it +would be as "easy" as. + +[source,syntaxhighlighter-pre] +---- +repo init -u git://gerrit.mycompany.net/mymanifest.git +repo sync +repo download $GERRIT_PROJECT $GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER +---- + +=== Missed Events Playback Feature (Available from v. 2.14.0) + +NOTE: This feature replaces the "Check Non-Reviewed Patchsets" option that was +part of a Job's Gerrit Trigger configuration. + +If your Jenkins instance has been down for a period of time (upgrade or +maintenance), the Missed Events Playback Feature ensures that any missed +events are re-played and builds are triggered. + +The mechanics are as follows: + +* The Playback Manager maintains a last known alive timestamp of events +that were received by the Gerrit Server connection. +* Upon re-connect, a request is made to the Gerrit Events-Log plugin +installed on the Gerrit Server to determine which events may have been +missed while the connection was down. +* The events are then added to the Gerrit Trigger event queue to be +processed. + +==== Setup Requirements + +The Playback Manager requires: + +* The REST api to be configured for the Gerrit Server Connection. +* The Gerrit Events-log plugin must be installed on the Gerrit Server +(Please see https://gerrit.googlesource.com/plugins/events-log/) + +===== Setting up the REST api + +* To setup the REST api for the Gerrit Server Connection, navigate to +*Manage Jenkins > Gerrit Trigger* and click on the *Edit* icon for the +Server Connection. +* Click on *Advanced*, and enter the *Gerrit HTTP User* and *Gerrit HTTP +Password* values as shown below. + +image:images/Playback-REST-Api.png[Playback REST Api] + +* Click on *Test REST Connection* to verify the user and password +settings. +* Click on *Save* +* Restart the connection using the *Status* icon in the Server Table +shown below: + +image:images/GerritServerRestartIcon.png[Restart Gerrit Server connection] + +===== Gerrit Server Events-Log plugin + +Gerrit Server Events-Log plugin + +NOTE: Please note that if the Gerrit Server Events-Log plugin is not installed +on the *Gerrit Server*, then the Playback Manager will be disabled. + + +* Please see https://gerrit.googlesource.com/plugins/events-log/ for +installation details. + +==== Verifying functionality + +* Once you have restarted the connection, click on the *Edit* icon in +the Server Table. If there is a problem with the Playback Manager's +configuration, you will see this: + +image:images/PlaybackWarning.png[Playback Warning] + +* If the Playback Manager is correctly setup, you will see the following +in the Jenkins log file when the Gerrit Server Connection is started: + +[source,syntaxhighlighter-pre] +---- +INFO: (8) missed events to process for server: defaultServer ... +---- + +== Skip Vote + +"Skipping" the vote means that if more than one build is triggered by a +Gerrit event the outcome of this build that "skips its vote" won't be +counted when the final vote is sent to Gerrit. If this is the only build +that is triggered then the vote will be 0. + +This can be useful if you have one job that triggers on all patch set +created events that just checks that the commit message is correctly +formatted, so it should only deny merging if it is a bad commit message +but also not allow the merge just because the message was ok. In that +scenario you could configure the "check commit message" job to skip +voting on Successful. + +== Additional Screenshots + +image:images/badges.PNG[Badges] +   +image:images/retrigger_no-border.jpg[Retrigger] +   +image:images/manual-trigger.png[Manual retrigger] + +== Pipeline Jobs + +Version 2.15.0 of the Gerrit Trigger plugin supports Jenkins Pipeline +job types. So as with the traditional job types, this plugin supports: + +. Triggering of Pipeline Jobs based on Gerrit Event notifications e.g. +the Patchset Created event. +. Checkout of the change-set revision from the Gerrit Git repository. +See example below. +. Sending of the "build completed" command to Gerrit (with Verified +label etc). + +The plugin doesn't currently offer a dedicated DSL syntax for performing +the change-set checkout. However, it's very easy to perform the checkout +using the Gerrit parameters provided to the build, along with the +existing Workflow step for Git (or other supported SCM) e.g. + +[source,syntaxhighlighter-pre] +---- +node { + // Checkout the Gerrit git repository using the existing + // workflow git step... + git url: '' + + // Fetch the changeset to a local branch using the build parameters provided to the + // build by the Gerrit plugin... + def changeBranch = "change-${GERRIT_CHANGE_NUMBER}-${GERRIT_PATCHSET_NUMBER}" + sh "git fetch origin ${GERRIT_REFSPEC}:${changeBranch}" + sh "git checkout ${changeBranch}" + + // Build the changeset rev source etc... +} +---- + +Note though that with this approach the changelog will not show +correctly. + +== Tips & Tricks + +This section contains some useful tips and tricks that users has come up +with. Feel free to add your own. + +=== Using "Build Now" + +Normally when you have configured a job to be triggered by Gerrit you +can't use the "Build Now" link anymore since your builds are dependent +on information from Gerrit, especially if you are using the Git plugin +to checkout your code in the workspace. + +You can get around this limitation if you for example want to use the +same job to build the master branch at some point. If you are using the +Git plugin do the following + +[source,syntaxhighlighter-pre] +---- +Add a String parameter called GERRIT_REFSPEC with the default value refs/heads/master +---- + +Using this trick will enable you to build, but no results will be sent +to Gerrit since it is not triggered by it. + +=== Multiple jobs review the same changeset (possibly giving different answers) + +That's possible, see +http://strongspace.com/rtyler/public/gerrit-jenkins-notes.pdf + +=== Reduce number of notification emails + +Since the trigger adds a comment in Gerrit for each build start and end, +usually all the reviewers get a notification email. This can get quite +annoying. However, it's possible to configure Gerrit so that only the +change owner and people who starred the change get a notification email. +To do this DENY the 'Email Reviewers' capability for the Gerrit user +that is used by Jenkins. See +https://gerrit-review.googlesource.com/Documentation/access-control.html#capability_emailReviewers. + +=== Note to Gerrit > 2.6 Users + +The verdict category key values has changed in 2.6 from CDRV, VRIF to +Code-Review and Verified. So in order to be able to trigger on comment +added you need to change the settings on the "Manage Jenkins/Gerrit +Trigger" page (it's hidden behind the advanced button) and reconfigure +all your jobs so they can pick up the new values. + +Also note that the Verified flag is no longer in Gerrit by default, +see http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/cmd-review.html so +you'll need to add it to Gerrit for new installs.  This can +http://blog.bruin.sg/2013/04/how-to-edit-the-project-config-for-all-projects-in-gerrit/[easily +be added back to all projects].  Otherwise the Gerrit Trigger will fail +to submit votes for jobs, due to the invalid label. + +Alternately, you can remove the verified flag from the command used to +submit votes for changes, and simply have the trigger submit code review +votes: + +. Go to "Manage Jenkins" and click the "Gerrit Trigger" link +. Under "Gerrit Servers" next to your server(s) click the "Edit" button +(looks like a gear, other icons may overlap it) +. Under "Gerrit Reporting Values" click the Advanced button at the +bottom +. Under "Gerrit Verified Commands" remove the '--verified ' +sections from each command, see screenshot + +image:images/verified-voting.png[verified voting,width=200] + +As of version 2.17.0 the verified "vote" is not sent at all to Gerrit +_(removed from the command line/rest call)_ unless there is an actual +value to be sent. So if you change the configuration to contain only +values for code review and empty strings for verified you won't get the +error. + +== Change Log + +New releases are logged in https://github.com/jenkinsci/gerrit-trigger-plugin/releases[GitHub Releases]. + +Releases from 2.30.0 and older are archived in link:CHANGELOG.old.adoc[CHANGELOG.old.adoc] + diff --git a/docs/images/GerritServerRestartIcon.png b/docs/images/GerritServerRestartIcon.png new file mode 100644 index 000000000..ab2fffafe Binary files /dev/null and b/docs/images/GerritServerRestartIcon.png differ diff --git a/docs/images/Playback-REST-Api.png b/docs/images/Playback-REST-Api.png new file mode 100644 index 000000000..2106223d1 Binary files /dev/null and b/docs/images/Playback-REST-Api.png differ diff --git a/docs/images/PlaybackWarning.png b/docs/images/PlaybackWarning.png new file mode 100644 index 000000000..1568fc01b Binary files /dev/null and b/docs/images/PlaybackWarning.png differ diff --git a/docs/images/badges.PNG b/docs/images/badges.PNG new file mode 100644 index 000000000..7dd78edf8 Binary files /dev/null and b/docs/images/badges.PNG differ diff --git a/docs/images/commentadded.PNG b/docs/images/commentadded.PNG new file mode 100644 index 000000000..541094c83 Binary files /dev/null and b/docs/images/commentadded.PNG differ diff --git a/docs/images/dynamictriggerconfig.PNG b/docs/images/dynamictriggerconfig.PNG new file mode 100644 index 000000000..78330298a Binary files /dev/null and b/docs/images/dynamictriggerconfig.PNG differ diff --git a/docs/images/gerritconf.PNG b/docs/images/gerritconf.PNG new file mode 100644 index 000000000..1b2913b68 Binary files /dev/null and b/docs/images/gerritconf.PNG differ diff --git a/docs/images/git_config.png b/docs/images/git_config.png new file mode 100644 index 000000000..e6b7ba47b Binary files /dev/null and b/docs/images/git_config.png differ diff --git a/docs/images/manual-trigger.png b/docs/images/manual-trigger.png new file mode 100644 index 000000000..c29ed67d8 Binary files /dev/null and b/docs/images/manual-trigger.png differ diff --git a/docs/images/refreshconfig.PNG b/docs/images/refreshconfig.PNG new file mode 100644 index 000000000..7b76918d3 Binary files /dev/null and b/docs/images/refreshconfig.PNG differ diff --git a/docs/images/retrigger_no-border.jpg b/docs/images/retrigger_no-border.jpg new file mode 100644 index 000000000..884b81057 Binary files /dev/null and b/docs/images/retrigger_no-border.jpg differ diff --git a/docs/images/server-settings.png b/docs/images/server-settings.png new file mode 100644 index 000000000..693cee6c2 Binary files /dev/null and b/docs/images/server-settings.png differ diff --git a/docs/images/trigger-server-control.png b/docs/images/trigger-server-control.png new file mode 100644 index 000000000..45e0775d7 Binary files /dev/null and b/docs/images/trigger-server-control.png differ diff --git a/docs/images/verified-voting.png b/docs/images/verified-voting.png new file mode 100644 index 000000000..7ac714d10 Binary files /dev/null and b/docs/images/verified-voting.png differ diff --git a/pom.xml b/pom.xml index aa1811c14..7bcc0c716 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ hpi Gerrit Trigger Integrates with Gerrit code review. - http://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger + https://github.com/jenkinsci/gerrit-trigger-plugin/blob/master/docs/README.adoc