[JIRA] (JENKINS-57931) Add more information about gerrit change

13 views
Skip to first unread message

mmarkow2@gmail.com (JIRA)

unread,
Jun 10, 2019, 3:49:01 AM6/10/19
to jenkinsc...@googlegroups.com
Mariusz Markowski created an issue
 
Jenkins / Improvement JENKINS-57931
Add more information about gerrit change
Issue Type: Improvement Improvement
Assignee: lucamilanesio
Components: gerrit-code-review-plugin
Created: 2019-06-10 07:48
Priority: Minor Minor
Reporter: Mariusz Markowski

It would be great if the gerrit code review plugin could add more information about gerrit change being built - ideally the same information that gerrit trigger plugin passes or at least subset of this information.

Particularly following environment variables would be helpful:

  • GERRIT_CHANGE_NUMBER
  • GERRIT_PATCHSET_NUMBER
  • GERRIT_PATCHSET_REVISION
  • GERRIT_CHANGE_ID

Also information about change status (open, merged) would be helpful.
 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

lucamilanesio@java.net (JIRA)

unread,
Jun 14, 2019, 11:27:03 AM6/14/19
to jenkinsc...@googlegroups.com
lucamilanesio commented on Improvement JENKINS-57931
 
Re: Add more information about gerrit change

Have you checked at the variables currently available at https://github.com/jenkinsci/gerrit-code-review-plugin ?

  • GERRIT_CHANGE_NUMBER: it's there
  • GERRIT_PATCHSET_NUMBER: it's contained in the BRANCH_NAME
  • GERRIT_PATCHSET_REVISION: it's the HEAD
  • GERRIT_CHANGE_ID: this is contained in the commit footer of HEAD

mmarkow2@gmail.com (JIRA)

unread,
Jun 17, 2019, 2:30:02 AM6/17/19
to jenkinsc...@googlegroups.com

I not sure but it seems that GERRIT_CHANGE_NUMBER is added by Gerrit Trigger Plugin.

In our case we want to use Multibranch Pipeline and setup Gerrit Code Review plugin as a branch source.
I don't know if Gerrit Trigger Plugin can be used in such setup.

I'm aware that some information can be parsed from BRANCH_NAME but it would nice to be able to refer to it from pipeline as simple env.VARNAME.

Also we need some information about Gerrit change before git checkout is done so we can't use git information - but it may be our specific requirement.

luca.milanesio@gmail.com (JIRA)

unread,
Nov 24, 2019, 4:18:02 PM11/24/19
to jenkinsc...@googlegroups.com

Have you checked the latest version of this plugin?

See the full list of supported variables at https://github.com/jenkinsci/gerrit-code-review-plugin

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

felipecassiors@gmail.com (JIRA)

unread,
Dec 4, 2019, 7:32:03 AM12/4/19
to jenkinsc...@googlegroups.com

luca.milanesio@gmail.com (JIRA)

unread,
Jan 5, 2020, 2:21:02 PM1/5/20
to jenkinsc...@googlegroups.com

mmarkow2@gmail.com (JIRA)

unread,
Jan 5, 2020, 3:35:02 PM1/5/20
to jenkinsc...@googlegroups.com

Sorry for not responding.
We were using Gerrit 2.14 but now switched to 2.16.
We still use old version of the Gerrit Trigger Plugin.
When we upgrade to newest version I will confirm if all variables are available.
Thank you for help.

luca.milanesio@gmail.com (JIRA)

unread,
Jan 5, 2020, 4:11:02 PM1/5/20
to jenkinsc...@googlegroups.com

The compatibility with Gerrit v2.14 should be fixed with the plugin v0.4.x, you could try even now

Reply all
Reply to author
Forward
0 new messages