[JIRA] (JENKINS-51476) Git parameter plugin is not retrieving revision number

0 views
Skip to first unread message

chortels@everis.com (JIRA)

unread,
May 22, 2018, 9:43:02 AM5/22/18
to jenkinsc...@googlegroups.com
Carlos Hortelano created an issue
 
Jenkins / Bug JENKINS-51476
Git parameter plugin is not retrieving revision number
Issue Type: Bug Bug
Assignee: Boguslaw Klimas
Attachments: revision_menu.jpg
Components: git-parameter-plugin
Created: 2018-05-22 09:42
Environment: OS: CentOS 6.7
Jenkins version: 2.89.4
Git parameter plugin: 0.9.2
Labels: jenkins plugin git
Priority: Major Major
Reporter: Carlos Hortelano

Hi, 

Trying to make some functional tests with git parameter plugin, I realised that when configuring "Revision" as input parameter, the list appears as it was empty. I don't have this problem when defining branch or tag as input parameters. 

In the image below you can see the issue I'm reporting:

However, I've seen that in this list there is content, because I'm able to click on any item on it and, when launching the job, it indicates me the revision I'm working with, and it is different depending on the row of the list I clicked. In summary, the issue is that Jenkins doesn't show the revisions in the list, but they are really there. 

Investigating this strange behaviour I've seen this message in Jenkins log: 

Did not find author pattern author <my_name><my_mail> 2017-11-28T08:27:05+0100

This message is returned in java class RevisionInfoFactory.java, whose source code is here: https://github.com/jenkinsci/git-parameter-plugin/blob/master/src/main/java/net/uaznia/lukanus/hudson/plugins/gitparameter/RevisionInfoFactory.java

Analysing the code I assume that author <my_name><my_mail> 2017-11-28T08:27:05+0100 corresponds to authorLine variable. In this case, it seems clear that the pattern that Jenkins Git parameter plugin is obtaining from Git doesn't match with the one defined here in  RevisionInfoFactory.java:

public static final Pattern AUTHOR_LINE_PATTERN = Pattern.compile("author (.* <.@.>) (
d{10}) (\\+-
d{4})");

 

Have you found any similar issue before? Is there a plan to resolve this?

 

Regards

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

chortels@everis.com (JIRA)

unread,
May 22, 2018, 9:53:04 AM5/22/18
to jenkinsc...@googlegroups.com
Carlos Hortelano updated an issue
Change By: Carlos Hortelano
Hi, 

Trying to make some functional tests with git parameter plugin, I realised that when configuring "Revision" as input parameter, the list appears as it was empty. I don't have this problem when defining branch or tag as input parameters. 

In the image below you can see the issue I'm reporting:

!revision_menu.jpg!

However, I've seen that in this list there is content, because I'm able to click on any item on it and, when launching the job, it indicates me the revision I'm working with, and it is different depending on the row of the list I clicked. *In summary, the issue* *is that Jenkins doesn't show the revisions in the list, but they are really there.* 


Investigating this strange behaviour I've seen this message in Jenkins log: 

_Did not find author pattern author Carlos Beltran Hortelano Sancho < my_name carlos.beltran....@everis.com > <my_mail> 2017-11-28T08:27:05+0100_

This message is returned in java class *RevisionInfoFactory.java,* whose source code is here: *[https://github.com/jenkinsci/git-parameter-plugin/blob/master/src/main/java/net/uaznia/lukanus/hudson/plugins/gitparameter/RevisionInfoFactory.java]*

Analysing the code I assume that _author
  Carlos Beltran Hortelano Sancho < my_name carlos.beltran....@everis.com > <my_mail> 2017-11-28T08:27:05+0100_ corresponds to   _authorLine_   variable. In this case, it seems clear that the pattern that Jenkins Git parameter plugin is obtaining from Git doesn't match with the one defined here in  *RevisionInfoFactory.java:*

_public static final Pattern AUTHOR_LINE_PATTERN = Pattern.compile("author (.* <.*@.*>) (
_
_d
\ \d\ {10}) ([\\+- |file://+-/ ] _
_d
\ \d\ {4})");_


 

Have you found any similar issue before? Is there a plan to resolve this?

 

Regards

klimas7@gmail.com (JIRA)

unread,
May 23, 2018, 9:28:02 PM5/23/18
to jenkinsc...@googlegroups.com
Boguslaw Klimas updated an issue
Change By: Boguslaw Klimas
Attachment: image-2018-05-23-23-27-42-080.png

scm_issue_link@java.net (JIRA)

unread,
May 23, 2018, 9:54:02 PM5/23/18
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Bug JENKINS-51476
 
Re: Git parameter plugin is not retrieving revision number

Code changed in jenkins
User: klimas7
Path:
src/test/java/net/uaznia/lukanus/hudson/plugins/gitparameter/RevisionInfoFactoryTest.java
http://jenkins-ci.org/commit/git-parameter-plugin/a324ac6988ee0fb76fdaaa5f92db2326793f9b70
Log:
JENKINS-51476: JGit retrieving revision number

klimas7@gmail.com (JIRA)

unread,
May 23, 2018, 9:54:03 PM5/23/18
to jenkinsc...@googlegroups.com

Hi,

You have configured JGit in our job as 'Git executable'

JGit returns a different date format then native Git

JGit (JGitAPIImpl) raw

commit ee650d9b5dbc39ec1bdfc6608f49db94ce8d7be4
tree bec018f8e55ce4a83fe4fb5592ffafaf5732d9d1
parent b9a246e842a5478fe01b52eb93e0e23cdb79f616
author klimas7 <kli...@gmail.com> 2018-04-16T21:35:17+0200
committer klimas7 <kli...@gmail.com> 2018-04-16T21:35:17+0200

Version 0.9.2 - Typo"

:100644 100644 a01738c8f727254fdcf9d03fcb0965567104a31e 7000020bf612f451539eb83beccfdef898fecdb3 M\tREADME.textile

Git (CliGitAPIImpl) raw

commit ee650d9b5dbc39ec1bdfc6608f49db94ce8d7be4
tree bec018f8e55ce4a83fe4fb5592ffafaf5732d9d1
parent b9a246e842a5478fe01b52eb93e0e23cdb79f616
author klimas7 <kli...@gmail.com> 1523907317 +0200
committer klimas7 <kli...@gmail.com> 1523907317 +0200

Version 0.9.2 - Typo"

:100644 100644 a01738c8f727254fdcf9d03fcb0965567104a31e 7000020bf612f451539eb83beccfdef898fecdb3 M\tREADME.textile

Thanks for reported issue.

Regards

Bogusław

 

 

scm_issue_link@java.net (JIRA)

unread,
May 23, 2018, 9:54:03 PM5/23/18
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: klimas7
Path:
src/main/java/net/uaznia/lukanus/hudson/plugins/gitparameter/RevisionInfoFactory.java
src/test/java/net/uaznia/lukanus/hudson/plugins/gitparameter/RevisionInfoFactoryTest.java
http://jenkins-ci.org/commit/git-parameter-plugin/339825733729199a0c22c35d597fb8d837f0b59e


Log:
JENKINS-51476: JGit retrieving revision number

Compare: https://github.com/jenkinsci/git-parameter-plugin/compare/a324ac6988ee^...339825733729
*NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

Functionality will be removed from GitHub.com on January 31st, 2019.

scm_issue_link@java.net (JIRA)

unread,
May 24, 2018, 6:18:02 PM5/24/18
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: klimas7
Path:
src/main/java/net/uaznia/lukanus/hudson/plugins/gitparameter/RevisionInfoFactory.java

*NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

Functionality will be removed from GitHub.com on January 31st, 2019.

scm_issue_link@java.net (JIRA)

unread,
May 24, 2018, 6:30:01 PM5/24/18
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Boguslaw Klimas
Path:
src/main/java/net/uaznia/lukanus/hudson/plugins/gitparameter/RevisionInfoFactory.java
src/test/java/net/uaznia/lukanus/hudson/plugins/gitparameter/RevisionInfoFactoryTest.java
http://jenkins-ci.org/commit/git-parameter-plugin/2369bfe8e101c3129e3c61966c5e721054f4a91f
Log:
Merge pull request #64 from jenkinsci/bugfix/JENKINS-51476

Bugfix/jenkins 51476

Compare: https://github.com/jenkinsci/git-parameter-plugin/compare/ee650d9b5dbc...2369bfe8e101


*NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

Functionality will be removed from GitHub.com on January 31st, 2019.

klimas7@gmail.com (JIRA)

unread,
May 24, 2018, 6:31:03 PM5/24/18
to jenkinsc...@googlegroups.com
Boguslaw Klimas started work on Bug JENKINS-51476
 
Change By: Boguslaw Klimas
Status: Open In Progress

klimas7@gmail.com (JIRA)

unread,
Jun 21, 2018, 7:51:02 PM6/21/18
to jenkinsc...@googlegroups.com
Boguslaw Klimas resolved as Fixed
 

Release version 0.9.3

Change By: Boguslaw Klimas
Status: In Progress Resolved
Resolution: Fixed

chortels@everis.com (JIRA)

unread,
Apr 2, 2020, 5:16:04 PM4/2/20
to jenkinsc...@googlegroups.com
Carlos Hortelano updated an issue
Change By: Carlos Hortelano
Hi, 

Trying to make some functional tests with git parameter plugin, I realised that when configuring "Revision" as input parameter, the list appears as it was empty. I don't have this problem when defining branch or tag as input parameters. 

In the image below you can see the issue I'm reporting:

!revision_menu.jpg!

However, I've seen that in this list there is content, because I'm able to click on any item on it and, when launching the job, it indicates me the revision I'm working with, and it is different depending on the row of the list I clicked. *In summary, the issue* *is that Jenkins doesn't show the revisions in the list, but they are really there.* 

Investigating this strange behaviour I've seen this message in Jenkins log:  lo

_Did not find author pattern author Carlos Beltran Hortelano Sancho <carlos.beltran....@everis.com> 2017-11-28T08:27:05+0100_

Analysing the code I assume that  _author Carlos Beltran Hortelano Sancho <carlos.beltran....@everis.com> 2017-11-28T08:27:05+0100_ __   corresponds to _authorLine_ variable. In this case, it seems clear that the pattern that Jenkins Git parameter plugin is obtaining from Git doesn't match with the one defined here in  *RevisionInfoFactory.java:*


_public static final Pattern AUTHOR_LINE_PATTERN = Pattern.compile("author (.* <.*@.*>) (_
_d\{10}) ([\\+-|file://+-/]_
_d\{4})");_


 

Have you found any similar issue before? Is there a plan to resolve this?

 

Regards
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

chortels@everis.com (JIRA)

unread,
Apr 2, 2020, 5:17:02 PM4/2/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages