In order to learn the Jenkins Pipeline domain specific language (DSL) in an exploratory way as well as to work with it more efficiently later, code completion is very helpful. This article demonstrates how this can be realised with IntelliJ IDEA in just a few steps.
When using the Pipeline plugin, it is a convention to describe the Pipeline in a file called
Jenkinsfile. Anyone who sticks to this is already halfway to code completion by IDEA – the Jenkinsfile filename is already associated with the Groovy programming language. As a result, you already have code completion for all Groovy language constructs.
However, this doesn’t help at all when it comes to the Pipeline DSL. The language constructs available here depend on which plugins are installed in the instance of Jenkins being used. Consequently, this information must also be obtained from there. For this, the Pipeline plugin provides a description in the form of a Groovy DSL script (GDSL) file. This can be downloaded from
If, for example, Jenkins runs under
localhost and a job
myproject is set up, the URL for the GDSL file is
In order for this to be read by IntelliJ, it must be saved in a source folder with the suffix
.gdsl, for example under
src/main/groovy/jenkins.gdsl. Depending on the folder and project, this must still be designated as a sources folder under File | Project Structure | Modules. Then, the following should be possible in
Tested with IntelliJ 2017.1.2 and Jenkins ver. 2.46.2.