Jenkins: gerrit trigger plugin issues after update

Description

It looks like the Gerrit trigger plugin is broken after yesterday's release due to SECURITY-170 implemented in the new Jenkins version:

https://wiki.jenkins-ci.org/display/JENKINS/Plugins+affected+by+fix+for+SECURITY-170

Sample failing triggered build:
http://jenkins.ovirt.org/job/infra-puppet_production_check-puppet-manifests_gerrit/148/console

is caused by

Activity

Show:

Former user July 28, 2016 at 7:50 PM

Jenkins restarted, changes applied. As the trigger was broken I had to update the plugin manually update the plugin and make it work, then re-submit the patch as a new change to ensure puppet is updated: https://gerrit.ovirt.org/61668

The plugin seems to work fine, so closing this for now.

Former user July 28, 2016 at 1:01 PM

I've added the new version to the change associated with EnvInject: https://gerrit.ovirt.org/61608

Former user July 28, 2016 at 12:09 PM

Alternatively we can just go with gerrit trigger plugin version 2.21.0 or newer as that reports to include the fix:
https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger#GerritTrigger-Version2.21.0%28releasedMay302016%29

I think this is the best way to go, will test this on Staging together with https://ovirt-jira.atlassian.net/browse/OVIRT-652#icft=OVIRT-652 and apply.

Former user July 28, 2016 at 11:57 AM

The recommended workaround is to whitelist the parameters in hudson.model.ParametersAction.safeParameters

For gerrit trigger they are:
GERRIT_EVENT_TYPE,GERRIT_EVENT_HASH,GERRIT_BRANCH,GERRIT_TOPIC,
GERRIT_CHANGE_NUMBER,GERRIT_CHANGE_ID,GERRIT_PATCHSET_NUMBER,
GERRIT_PATCHSET_REVISION,GERRIT_REFSPEC,GERRIT_PROJECT,GERRIT_CHANGE_SUBJECT,
GERRIT_CHANGE_COMMIT_MESSAGE,GERRIT_CHANGE_URL,GERRIT_CHANGE_OWNER,
GERRIT_CHANGE_OWNER_NAME,GERRIT_CHANGE_OWNER_EMAIL,
GERRIT_PATCHSET_UPLOADER,GERRIT_PATCHSET_UPLOADER_NAME

To add them we can set the list in JENKINS_JAVA_OPTIONS of /etc/sysconfig/jenkins

Fixed

Details

Assignee

Reporter

Components

Priority

Created July 28, 2016 at 11:48 AM
Updated May 25, 2017 at 11:30 AM
Resolved July 28, 2016 at 7:50 PM

Flag notifications