Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,237
Community Members
 
Community Events
168
Community Groups

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

Edited

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

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'
]
)
}
}
}
}
}

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]}]. 

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

Atlassian Community Events