[JIRA] (JENKINS-58628) jira-plugin not working from pipeline job: jiraIssueSelector doesn't find any issues

11 views
Skip to first unread message

porter@byu.net (JIRA)

unread,
Jul 24, 2019, 1:10:02 AM7/24/19
to jenkinsc...@googlegroups.com
Porter Bassett created an issue
 
Jenkins / Bug JENKINS-58628
jira-plugin not working from pipeline job: jiraIssueSelector doesn't find any issues
Issue Type: Bug Bug
Assignee: Unassigned
Components: jira-plugin
Created: 2019-07-24 05:09
Environment: Jenkins ver. 2.138.2
jira-plugin version 3.0.3
Labels: pipeline
Priority: Major Major
Reporter: Porter Bassett

jira-plugin works fine from a freestyle job, but is not working properly from a pipeline job.

I am comparing a freestyle job using the {{"JIRA: Update relevant issues" }}post-build step with a pipeline job using the jiraIssueSelector pipeline step.

When run on a commit with a commit message of "DEVO-2398 DEVO-2399", the freestyle job correctly gives me the output

[JIRA] Updating issue DEVO-2399
[JIRA] Updating issue DEVO-2398

When I run against the same commit message in the pipeline job, the jiraIssueSelector is not able to identify the Jira items.

I put the following in my Jenkinsfile:

{{def issueKeys = jiraIssueSelector(issueSelector: [$class: 'DefaultIssueSelector']) }}

echo "${issueKeys.size()}"

 and I get the output

 

 [Pipeline] jiraIssueSelector

[Pipeline] echo

0

The jiraIssueSelector is not finding any jiraIssues in the commit message.

The globally configured "issue pattern" is left blank, so it is left using the default ([a-zA-Z][a-zA-Z0-9_]+-[1-9][0-9]*)([^.]|\.[^0-9]|\.$|$)

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

christoph.forster@swarovski.com (JIRA)

unread,
Sep 5, 2019, 2:57:03 AM9/5/19
to jenkinsc...@googlegroups.com
Christoph Forster commented on Bug JENKINS-58628
 
Re: jira-plugin not working from pipeline job: jiraIssueSelector doesn't find any issues

Porter Bassett: As you can see in JENKINS-58372 you need to link the "jiraIssueSelector" with the checked out repository.

def gitScm = git url:  'ssh://g...@myhostedbitbucket.com:7999/tools/gittraining.git', branch: 'develop'
test = jiraIssueSelector(issueSelector: [$class: 'DefaultIssueSelector'], scm: gitScm) 
println test

radek.antoniuk@quiddia.com (JIRA)

unread,
Oct 10, 2019, 5:24:05 AM10/10/19
to jenkinsc...@googlegroups.com
Radek Antoniuk closed an issue as Cannot Reproduce
 
Change By: Radek Antoniuk
Status: Open Closed
Resolution: Cannot Reproduce
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages