The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pass jira issue key and issue status to jenkins job through custom post function

Nagomi
November 3, 2016

Hi,

I am new to groovy script and I used the following script to trigger jenkins job

import com.atlassian.jira.issue.Issue
def launch= ["wget", "--auth-no-challenge", "--user=username", "--password=password", "https://jenkins.com/vz/job/VZW.MYV.JIRA.test/build?token=jira&delay=0sec&JiraIssue=${issue.key}"].execute().text;
println launch

this will trigger when the issue has been closed. Without passing JiraIssue parameter am able to call jenkins job once adding the parameter it is not triggering the jenkins job, but I need  to pass issue key and the status of issue to Jenkins job.
Any suggestions for this problem

 

 

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Nagomi
November 3, 2016

I want to know the syntax what I am using in custom post function is correct and how to pass issue status and assignee in the Jenkins url like passing issue key

0 votes
nanda kumar D
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 20, 2017

Try buildwithParameters? instead just build

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 3, 2016

This should be a question that you should ask in the Jenkins forums right?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events