It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner integration for Bitbucket

Sanjeeka Silva Jan 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
Adam Markham [Adaptavist] Community Leader Jan 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 Apr 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 Feb 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 Mar 05, 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 Feb 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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

Webinar alert! An IT Admin's Guide to Securing Collaboration at Scale

Hello, Atlassian Community! My name is Dave Meyer and I'm a Principal Product Manager at Atlassian. I wanted to give this community a heads up about an upcoming Webinar that might be of interest...

185 views 2 7
Read article

Community Events

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

Events near you