Hello people,
I am trying to perform continuous integration using Confluence, Jira, Bitbucket, and Bamboo, all are being used in the server version.
I was able to currently automate continuous delivery between all instances but I have a problem with communication between Bamboo and Jira when the deployment is performed.
After the deployment is complete, I would like to send the deployment information with the status of the deployment result ("Success" or "Failure"). In Jira, this status if it is "Success", I want to transition the related issue from the Deploy column to the Done column.
I thought about using the Script task to send the webhook with this information to Jira, but I'm trying to print the variable on the screen as shown in the print below and it is not displayed on the screen but no error message appears.
I wanted some help on how to make this information transfer from Bamboo to Jira using the webhook because I didn't find in the documentation how it could be done. Or if there is another way to do this automation in Jira, I am open to suggestions.
I am sending below some prints with what I have done so far.
Screenshots:
The field that I'm trying to send to Jira via Webhook.
The script I made on Bamboo to send the webhook to Jira.
Log of the last deploy I carried out testing the value of the variable "deploymentState" on the screen.
Project board in Jira, where I want to transition the issue from the Build column to Done column.
Log of the Automation Rule to check if Bamboo information is arriving correctly in Jira.
Result of the last tests using the automation rule with Webhook.
Automation rule being triggered using Webhook.
I'm on the automation team. As we don't use Bamboo ourselves (on my specific team, lots of other teams inside Atlassian obviously do), I'm not intimately familiar with the integrations between Bambook and Jira. I would be a surprised if this is not something that one should be able to make "just work" without automation, though I don't know the configuration steps to do so.
I assume a bit of googling with lead to a standard solution. This documentation about integrating Bamboo into Jira workflows is a reasonable starting place: https://confluence.atlassian.com/bamboo059/integrating-builds-with-your-issues-workflow-800858400.html
All of that said, I'm happy to answer the question as if it were an automation specific question.
In the automation audit log screenshot, it appears to be successfully picking up the correct issue: CIP-5. That's a good start for the automation rule. It seems like the next problem to be solved is to pass along the success / failed status information as a part of the webhook data.
To do that you'll need to:
- Move the script to the final section (so that it runs on success or failure)
- Pass the ${bamboo.buildNumber} to the script
- Lookup the build result (see REST api here: https://docs.atlassian.com/atlassian-bamboo/REST/7.0.4/#d2e3009)
curl -X GET --user admin:admin "http://localhost:8085/bamboo/rest/api/latest/result/{project}-{buildkey}-{buildNumber}?buildstate"
- Parse the json and get the final build state.
- Pass that along to Automation via webhook.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.