We are trying to upload the Jenkins job build details to specific existing jira. Getting below error

Akhand Pratap Singh September 29, 2020

We are trying to upload the Jenkins job build details
to specific existing jira.
Below is the postaction code written in jenkins files.

jiraSendDeploymentInfo environmentId: 'XYZ', environmentName: 'DEV', environmentType: 'development', serviceIds: ['JJI-1'], site: 'XYZ.atlassian.net', state: 'successful'

But we are unable to upload the jenkins job details to jira and getting below error.
We have passed correct issue key and Id but still it's failing
Can you please help us to fix the issue.

jiraSendDeploymentInfo: FAILURE_UNKNOWN_ASSOCIATIONS: Failed to send deployment information to Jira: XYZ.atlassian.net. Unknown associations: [Association

Unknown macro: {associationType=serviceIdOrKeys, values=[JJI-1]}

].

MicrosoftTeams-image (1).png

3 answers

0 votes
Karuna Kant Mishra September 13, 2022

It works for us. We are manually passing the Jira ids PFB the syntax for same. Can also pass in a variable for the same

pipeline {
agent any
stages{
stage('Deploy - Staging') {
steps{
echo 'Deploying to QA'
}

post {
always {
jiraSendDeploymentInfo (
environmentId: 'Manual_QA',
environmentName: 'Manual_QA',
environmentType: 'development',
state: 'successful',
issueKeys: [
'XXXX-132169',
'XXXX-132169'
]
)
}
}
}
}
}

0 votes
Bhaskarreddy October 7, 2021

I am also stuck here with the same error can anyone got a solution to this.

 

iraSendDeploymentInfo: FAILURE_UNKNOWN_ASSOCIATIONS: Failed to send deployment information to Jira: us.atlassian.net. Unknown associations: [Association{associationType=serviceIdOrKeys, values=[COG1-6263, COG1-6265]}]. 

0 votes
stszap
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!
October 27, 2020

I believe there is no way right not to manually specify issue ids for jiraSendDeploymentInfo() because it just parses the changelog (commits since the last deployment). `serviceIds` parameter is used for linking to Jira Service Desk tickets if I understand correctly. I'm also searching for a way to specify issue id from Jira Software.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events