I have a script in scriptrunner in Jira, that I can execute in the console correctly.
Is it possible to somehow execute that script from outside Jira, for example from Bamboo?
Hi @Ricardo Martinez yeah you can execute scripts which are stored on Jira Server via REST API. It is described here:
In section Executing Script Console Scripts Remotely
Its exactly what I was looking for.
And i have it working now! ;)
curl -u admin:admin -X POST "http://<jira>/jira/rest/scriptrunner/latest/user/exec/" -H "X-Atlassian-token: no-check" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "Accept: application/json" --data-urlencode "scriptFile=foo/bar.groovy"
Do you know how can I send an argument to the script with the previous command?
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events