Scriptrunner integration for Bitbucket

Sanjeeka Silva January 19, 2018

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

2 answers

1 accepted

0 votes
Answer accepted
adammarkham
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.
January 19, 2018

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.

David Puchosic April 13, 2018

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"
bryan.bai@wdc.com February 28, 2019

I have same question about dark feature in bitbucket, which kind of ignored from scriptrunner documentation. 

but when I try to access: https://localhost:63349/  , after add the browser exception, I got a 404 Not found page.

and when I click IntelliJ icon from bitbucket GUI, the icon spin forever, without create any local project.

David Puchosic March 5, 2019

I'll have to test again, but off the top of my head I remember the add-on being picky about the IdeaJ version I was running. It wasn't working with the latest version. I currently have IntelliJ Community 2017.3.5 loaded.

0 votes
bryan.bai@wdc.com February 28, 2019

I have same question about dark feature in bitbucket, which kind of ignored from scriptrunner documentation. 

but when I try to access: https://localhost:63349/  , after add the browser exception, I got a 404 Not found page.

and when I click IntelliJ icon from bitbucket GUI, the icon spin forever, without create any local project.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events