How can I add a button in issue view to run bash script on server?

Backstory

We are using https://deployer.org/ to push branches linked with JIRA in our staging environment.

In our testing phase, the end-user usage test done by non-developer who don't have access to deploying and has to ask any of our developers to switch working branch in staging. This takes time from two people and adds complexity which we want to get rid of.

Question

How we can add a button in issue view for running our deployment script with branch name linked in JIRA issue? The idea is that we could have a short bash script that can be run on background, no user interaction required since we know when something is deployed and get confirm from that.

1 answer

1 accepted

1 votes
Volodymyr Krupach Community Champion Mar 15, 2017

I do not see quick/easy approach for what you need. Only approach I see is to create a custom addon:

  • With web-item plugin module that adds button to the issue view.
  • With server handler implemented as servlet or webwork module. 
  • The Java code should run your script. You might need to make sure that Java process has the permissions to run the external script.
  • The server code should return redirect to the initial issue screen.

Unfortunately JIRA/Atlassian addons are not so easy to start with. If you do not have experience it can take you a week or more sad.

 

That's a bummer. Yeah, the priority is always for developing our own product and taking a developer away from that for more than week for nice to have internal feature is bit too much. Anyway, appreciate your effort. thx.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

240 views 0 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot