I want to create a Jira automation that automatically deploys an ops sub-task to push Bitbucket changes to production without manual intervention. This automation should run twice a week in scrum board.
The steps for the automation are as follows:
The screenshot I provided is the automation I tired to make myself, it currently only creates the Non-Development work ticket only, rest of the automation fails.
Hi @Vivek J Welcome to the community!
To create this Jira automation for deploying a Bitbucket change, follow these steps. You will need both Jira automation rules and potentially integrations with Bitbucket pipelines or APIs.
Steps:
Create a scheduled trigger:
In Jira Automation, create a rule with the trigger "Scheduled" and set it to run twice a week (e.g., on specific days or intervals).
Create a Non-Development Work ticket:
After the trigger, use the "Create Issue" action to create a new ticket (Non-Development Work).
Set necessary fields like the project, issue type, summary, and any custom fields.
Create an ops sub-task linked to the parent issue:
Add another "Create Issue" action to create a sub-task. Link it to the previously created Non-Development Work ticket using the "Parent Issue" field.
Ensure that both tickets (task and sub-task) are assigned to the current sprint by using the “Edit Issue” action to update the sprint field.
Transition the ops sub-task:
Add a "Transition Issue" action to move the ops sub-task to ‘Ready for Prod.’
After this, add another transition to move the sub-task to 'Deployed in Prod.'
If your workflow supports direct transitions, you can combine these into one step. If not, use two transition actions.
Trigger Bitbucket deployment:
Use the "Send web request" action to trigger a Bitbucket deployment via its API or a webhook. Ensure the correct API token and endpoints are used to execute the deployment to production.
Send an email notification:
Add an action to "Send Email" to notify your team. Include key information, like which issue was moved to production and when. Optionally request confirmation from the team.
Transition the Non-Development Work ticket:
After the Bitbucket deployment, transition the Non-Development Work ticket to ‘Done’ using the "Transition Issue" action.
Hi @Manoj Gangwar, if I use the scheduler to automate the ‘send web request’ for the Bitbucket deployment, can I skip creating the tasks and ops sub-tasks altogether?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you can skip.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Manoj Gangwar we couldn’t get the web request to work so I went back to using transitions to deploy the ops sub task, I broke the automation into 2 parts for simplicity. Part 1 is the creation of non-dev work task and ops sub task(This automation works), and part 2 is the transition of the ops sub task I’m getting an error for that I’m not sure how to fix the error do you have any ideas how I can fix this issue that can be seen in audit log.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vivek J
Please check your workflow, i think there is no direct transition from ready for prod to deployed in prod. If not then add the transition
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Manoj Gangwar this is my current workflow, based on what I see we don’t have the direct transition. Can you show me an example of what the workflow would look like for my automation to work? I don’t have access to creating workflow since it’s a company managed project, so I would need to send the admin a screenshot of what it should be most likely to see if they can create it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vivek J workflow looks good. Could you please check if you are able to chane the status from In development to Ready for prod manually?
If ready for prod status transition option is not showing then check with admin there could be some validator Or condition are applied on the workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Manoj Gangwar I can change it from in development to ready for prod manually, which is why it’s weird that I got that error since I’m trying to move it from in development to ready for prod to deployed in prod, which we have a workflow for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vivek J could you please replace the rule actor with your name and then test?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gald to help. Please accept the answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.