EducationPerfect / azure-jira-update

Update Jira with Azure Deployment Information
MIT License
21 stars 17 forks source link

Bug: Linked Deployments do not correctly update #4

Closed b-twis closed 2 years ago

b-twis commented 3 years ago

When using your example of the Pending > InProgress > Successful/Failed as part of a single deploy task, it is incorrectly creating multiple separate deployments, rather than changing the status of the existing one.

I checked the Jira docs and can see that a new deployment will be created based on a unique combination of pipelineId, environmentId and deploymentSequenceNumber. https://developer.atlassian.com/cloud/jira/software/rest/api-group-deployments/#api-group-deployments

This line causes the issue. I would suggest replacing the datetime with the buildid. https://github.com/EducationPerfect/azure-jira-update/blob/7fb5b4e1bcb1539f0dd1bea4e0e6f47f39a44f16/EP.PowerShell.JiraDeployInfo/Public/Add-JiraDeploymentInformation.ps1#L146

Thanks,

Basil

mwheeler-ep commented 2 years ago

Thanks! This should be fixed now :)