Hello there,
We are starting to use Azure Dev Ops Services for our application pipelines but still want to use Jira Cloud for our software teams. Has anyone had any success in populating the standard Jira Development panel with build information from Azure DevOps Pipelines.
I know we seem to have to use an OAUTH token for this and I was hoping to use the apis from here: The Jira Software Cloud REST API (atlassian.com)
Anyone managed to do this at all?
@AndyHockenhull,
Where are you getting stuck? Before incorporating the API call into Azure DevOps Pipelines, have you tried a direct API call from your command-line?
Thanks so much for this @ibuchanan - I had searched for an example of how to do this - looks like I just missed this page - will give it a go and report back.
Thanks again @ibuchanan - this did the trick - we are all go now - thanks for replying - much appreciated.
1 Like
OK so one step forwards and one step back…
I managed to get the deployment example to work which is great this now shows deployments in my Jira dev instance.
When I try to use the same api endpoint to add build info, I am getting the below error:
400 bad Request
Error message:
[
{
"message": "At least one deployment is required"
}
]
Sorry - found I was using the wrong URI…
Am using - https://api.atlassian.com/jira/builds/0.1/cloud/[mycloudid]/bulk
And am now getting 400 error -
[
{
"message": "At least one build is required"
}
]
@AndyHockenhull,
Glad to hear your progress and I’m glad you were able to make the “translation” from deployments to builds. Being careful about any real world dev identifying data, can you share the request payload?
Hello there - here is the body I am using in the API call:
{
"schemaVersion": "1.0",
"pipelineId": "api-update",
"buildNumber": 16,
"updateSequenceNumber": 1523494301448,
"displayName": "My Project build #16",
"description": "My Project build #16: Failed",
"label": "ui test",
"url": "https://xxxxxxxx",
"state": "failed",
"lastUpdated": "2022-07-07T12:27:25.000Z",
"issueKeys": [
"CBJD-1"
],
"testInfo": {
"totalNumber": 150,
"numberPassed": 145,
"numberFailed": 5,
"numberSkipped": 0
}
}
Also - one thing I noticed in the example page you shared - it mentions using a team managed project - I am using a company managed so thought I should mention that in case that has any bearing. Although as the deployments API call works fine, I am not sure.
Sorry one further update - I noticed my error - I had incorrectly missed of the “builds” in the body of the api call.
All working as expected now!! Thanks again
1 Like