5

Recently I have to write more and more scripts for the jenkins console.

I think some assistance like syntax highlighting and code completion would make me more productive, especially because I am new to groovy.

I have found here some good ideas, but the scripts are still plain strings in java code.

Is there a way to set up a groovy project in eclipse, so that I have the jenkins api available for code completion? A really cool thing would be if I can run my script from eclipse.

How do you develop the jenkins console scripts?

Opal
  • 81,889
  • 28
  • 189
  • 210
cpetry
  • 198
  • 1
  • 11
  • 1
    You are right, current support in Jenkins is not as good as it could be. However, I think your question is not appropriate for stackoverflow since any answer would include opinions. Personally I use Eclipse, then copy the code into Jenkins to test it. – Jocce Nilsson May 18 '15 at 10:10

1 Answers1

0

Your question has already the answer. You start creating a plugin, say using gradle-jenkins. Build it, so all libraries are in place. Add eclipse plugin support and create eclipse project files ( Works similarly for intellij).

Create script and do the basic checks. Copy paste onto groovy console and run it.

Getting syntax highlighting on the web is going to be big task. Please see if Orion can help. It is eclipse on the web.

Jayan
  • 18,003
  • 15
  • 89
  • 143