Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,405
Community Members
 
Community Events
168
Community Groups

Use Automation to kick off project resource creation

I've been looking at the available actions for Automation, and I'm not sure the functionality is there, that I'm looking for. I wonder if something else might be a better solution. Actions needed include the following, after approval:

  • Create a new Confluence space for the approved project.
  • Create a new Bitbucket project and default repo.
  • Create a branch off of a "Cloud" repository, and commit a templated set of code.
    • After the code is committed, submit a PR including the the new code.
    • An engineer completes the PR, and a pre-baked Pipeline takes it from there.
  • (The above process of adding code templates to repositories may be repeated, in various repositories, with various templates)

2 answers

Hi @Tim Chaffin

 

So it would be great to understand what the 'approval' process is for you. But in theory if the approval was to create a Jira project for example Then you can use the webhook action to create all of the items you need to. We use Similar actions to create projects/spaces repos etc. when a service request ticket is approved.

You can use something like:

Capture.PNG

 

I would check out the api docs for each tool below. I'm more then happy to help you out on creating this rule:

Jira - https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-post

Confluence - https://developer.atlassian.com/cloud/confluence/rest/api-group-space/#api-wiki-rest-api-space-post

Bitbucket - https://developer.atlassian.com/cloud/bitbucket/announcement-06-08-18-new-v2-apis/

Dan

Apologies, approval in this case would be a request through Jira Service Management, that after approved, would kick off the automation. In this case, that could easily be a particular state the request could transition to, like you've illustrated here.

Ideally at the forefront of the request, a form would exist, to capture intake variables and use as smart variables throughout the automation too.

I'm with you on the same page when it comes to sending web requests, this would be pretty easy for creating a Jira project or a Confluence space.

What I'm still hung up on is committing code to an Infrastructure as Code project. Creating the Atlassian resources can be done pretty easy with the Web Request feature. But what I need is to go into a Bitbucket workspace/repository, and append a file through git. Basically, this would be a Terraform file, and using variables captured from the form, add a new cloud resource in code, and let the repository Pipeline take it from there.

0 votes
Mikael Sandberg Community Leader Sep 13, 2022

Automation cannot currently trigger on project creation, but you could do it on say version created. You could then have a initial version that is always created when you create a project. You would have to use REST API calls, since automation in Confluence cannot create a new space, and Bitbucket doesn't have automation yet.

You actually can trigger on project creation (relatively new). It is only in global obviously.

45B385CF-1E1A-4392-91FD-254659C20245.jpeg

 

with that said only GitHub supported AFAIK. Correction, creating of repo not an option but you can create a new branch for your project.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Atlassian Automation

Jira Automation: Sum Up Story Points Roundup (Initiatives -> Epics -> Story/Tasks -> Subtasks)

Hi Everyone, In this roundup we combine all the jira automation rules to sum up story points across different issue types. We start from the lowest level, summing up story points from sub-tasks t...

3,114 views 10 9
Read article

Atlassian Community Events