[workflow-plugin] Does anyone use a GroovyDSL script to describe the workflow plugin api with IntelliJ IDEA?

299 views
Skip to first unread message

Gary Clayburg

unread,
Jan 16, 2015, 12:13:59 AM1/16/15
to jenkins...@googlegroups.com


I am using IntelliJ IDEA to edit the workflow-plugin groovy scripts for my Jenkins build.  This works great for the generic groovy parts of the build script.  However, IntelliJ by itself has no knowledge of the workflow-plugin steps called from groovy so it can't suggest any completion or show the underlying Javadoc.  However, if you define a suitable .gdsl file for workflow-plugin, it could.  For example, I ran into an issue earlier today with the readFile step.  I blindly copied some text from another posting to the Jenkins users group.  It took some time to determine that the named parameters were wrong.  Yes, the snippit generator on the Jenkins web page helps somewhat, but for me, Javadoc is better.

Has anyone created one of these for workflow-plugin?  I think it would be a great help for learning about how to use these build steps.

For reference:

https://confluence.jetbrains.com/display/GRVY/Scripting+IDE+for+DSL+awareness#ScriptingIDEforDSLawareness-DescribingGroovyDSLinternallanguageinitsownterms


Gary Clayburg

unread,
Jan 22, 2015, 7:32:31 PM1/22/15
to jenkins...@googlegroups.com
https://gist.github.com/gclayburg/0107bdeb38349c6fc87a

I started to create a .gdsl file for IntelliJ on github.  Right now it supports these build steps:
sh
readFile
echo
node

This file contains both some Javadoc of the methods (build steps) and the parameters supported.  In IntelliJ: View->Quick Definition

Reply all
Reply to author
Forward
0 new messages