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

Jesse Jyläs March 14, 2017

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 vote
Answer accepted
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 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.

 

Jesse Jyläs March 16, 2017

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 Sign up to answer