Scriptrunner integration for Bitbucket

Hi, I was trying to follow the instructions on https://scriptrunner.adaptavist.com/latest/bitbucket/intellij-integration.html#_developing_with_intellij_idea to setup the intellij IDEA integration for a Bitbucket server instance and realized that even though I was looking at the BB docuementation, this info was referring to JIRA.


And adding the following to the end of the Bitbucket URL, does not work.

/secure/admin/SiteDarkFeatures!default.jspa"

Please let me know how I can start using this integration for custom scripts we need to write for Bitbucket. We are in the process of purchasing the Bitbucket Scriptrunner plugin.


Thanks,

Sanji

1 answer

1 accepted

0 votes
Accepted answer

Apologies for that, we'll fix the instructions for Bitbucket shortly.


To get the IDEA integration working you need to first follow the instructions here to download IDEA and install the ScriptRunner plugin. After that is done restart IDEA.

You then need to enable the IDEA integration in Bitbucket by setting the following JVM option:

-Datlassian.darkfeature.scriptrunner.idea.external.editor.enabled=true

You should have a setenv.sh file located where Bitbucket Server is installed.

You'll need to locate the following line in setenv.sh:

JVM_SUPPORT_RECOMMENDED_ARGS=""

This should be changed to:

JVM_SUPPORT_RECOMMENDED_ARGS="-Datlassian.darkfeature.scriptrunner.idea.external.editor.enabled=true"

After this restart Bitbucket Server for the change to take effect.

You then need to do the following steps:

  • With IDEA running go to https://localhost:63349/ in the browser and follow the instructions here for adding an exception.
  • After that is done click the IDEA icon again and it should start creating the project and downloading the dependencies for you.

Once that is done you can type something in the script that is open in IDEA and it should be reflected back in the browser.

Hope this helps.

This worked well on Bitbucket Server v5.4.1, just had to use _start-webapp.sh and restart.

JVM_SUPPORT_RECOMMENDED_ARGS="-Datlassian.darkfeature.scriptrunner.idea.external.editor.enabled=true"

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,373 views 0 8
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