Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is it possible to use Jira automation to transition a ops sub task to DEPLOYED IN PROD.

Vivek J September 16, 2024

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:

  1. Use the scheduler to create a Non-Development Work ticket.
  2. Create an ops sub-task linked to the Non-Development Work ticket as the parent issue. Both the task and the ops sub-task need to be visible in the current sprint for visibility purposes.
  3. Transition the ops sub-task to ‘Ready for Prod’ and then to ‘Deployed in Prod’ (if possible, directly transitioning to ‘Deployed in Prod’ to trigger deployment).
  4. Once the ops sub-task is deployed to production, it should trigger the Bitbucket deployment.
  5. Send an email to my team indicating that the automation has been triggered and requesting confirmation.
  6. Transition the Non-Development Work ticket to ‘Done’.

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. IMG_6275.png

 

1 answer

1 accepted

4 votes
Answer accepted
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 16, 2024

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.

Vivek J September 17, 2024

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?

Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 18, 2024

Yes, you can skip. 

Vivek J September 23, 2024

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. IMG_6286.pngIMG_6287.png

Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2024

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

Vivek J September 24, 2024

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. IMG_6289.png

Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2024

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. 

Vivek J September 24, 2024

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. 

Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2024

Hi @Vivek J  could you please replace the rule actor with your name and then test? 

Vivek J September 24, 2024

Hi @Manoj Gangwar it worked once I changed the rule actor to myself, thank you for all the help. 

Like Manoj Gangwar likes this
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2024

Gald to help. Please accept the answer. 

Vivek J September 24, 2024

Done, thank you. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events