jenkinsci/git-changelog-plugin

useJira: true does not work

Closed this issue · 9 comments

Hello,

in freestyle job everything works, but I'm using scripted pipelines. The problem is that I can't get jira publish filter plugin working to get the list of jira issues mentioned between two commits, it just does not provide any output, but it generates changelog file pretty much correctly. Could you please advice what could be wrong when you have a time?

Thank you so much

https://pastebin.mozilla.org/9075305

If I would want a list of jiras mentioned between 2 commits I would have a template that loops the issues list.

Oh , what is useJira variable then for ?

If set to true, and any needed jira-credentials is supplied, information from Jira will be made available in the issues objects. Like title, labels, type, description.

Thanks, can you please share example how those jira-credentials should look like ?

It is in the readme, you probably need to set these:

  • jiraUsername = "..."
  • jiraPassword = "..."
  • jiraServer = "..."
  • useJira = true

Thanks.

But there are couple things I still don't understand. How is it possible that in freestyle job I just set branch to "origin/master" and "toref" - $GIT_COMMIT (do you know is it possible to export his variable from somewhere?) and everything works, but in scripted pipeline is not possible to do at the moment ?

I mean this:

08:14:45 --- Git Changelog ---
08:14:45 ---
08:14:45
08:14:45 Jira-Tickets mentioned in commits between origin/master and 554a5ec13c0e479ea5c9a621209c271710acfa83:
08:14:45 PROJECT-2391,PROJECT-2270,PROJECT-2271,PROJECT-2272,PROJECT-2393,PROJECT-2450,PROJECT-2351,PROJECT-2330,PROJECT-2451,PROJECT-1587,PROJECT-984,PROJECT-2232,PROJECT-2378,PROJECT-2411,PROJECT-2412,PROJECT-2435,PROJECT-2414,PROJECT-1987,PROJECT-2217,PROJECT-2382,PROJECT-2241,PROJECT-1809,PROJECT-1472,PROJECT-1271,PROJECT-2504,PROJECT-2407,PROJECT-2067,PROJECT-2443,PROJECT-2444,PROJECT-2422,PROJECT-2269,PROJECT-2423,PROJECT-2468,PROJECT-2226,PROJECT-2425,PROJECT-2403,PROJECT-1910,PROJECT-2448,PROJECT-1932,PROJECT-2404
08:14:45 https://company.atlassian.net/issues/?jql=key%20in%20%28PROJECT-2391,PROJECT-2270,PROJECT-2271,PROJECT-2272,PROJECT-2393,PROJECT-2450,PROJECT-2351,PROJECT-2330,PROJECT-2451,PROJECT-1587,PROJECT-984,PROJECT-2232,PROJECT-2378,PROJECT-2411,PROJECT-2412,PROJECT-2435,PROJECT-2414,PROJECT-1987,PROJECT-2217,PROJECT-2382,PROJECT-2241,PROJECT-1809,PROJECT-1472,PROJECT-1271,PROJECT-2504,PROJECT-2407,PROJECT-2067,PROJECT-2443,PROJECT-2444,PROJECT-2422,PROJECT-2269,PROJECT-2423,PROJECT-2468,PROJECT-2226,PROJECT-2425,PROJECT-2403,PROJECT-1910,PROJECT-2448,PROJECT-1932,PROJECT-2404%29

This is from my freestyle job and I'm trying to achieve the same thing in scripted pipelines mode.

Ok I see. This plugin is a merge of 2 plugins. And that part is maintained by @paulwellnerbou .

@jenkinsfu, the part of the plugin creating this kind of changelogs is (intentionally) not talking to Jira. So the useJira flag does not have anything to do in this context.

I did not try the plugin with scripted pipelines yet, I will have a look at it.

Thanks to both of you.