How to add Pipeline DSL support to Intellij
Add Pipeline DSL support to Intellij
- Intellij is installed
- Existing Jenkins-Pipeline job
Install Groovy SDK
- Download desired groovy-sdk version from this site
- Extract archive to your preferred location
Add Groovy framework support
- Create new groovy project
Right-click on project root and choose 'Add Framework Support'
Check 'Groovy' and create a new library from downloaded sdk
Add Pipeline DSL Support
- Create a temp Jenkins Pipeline job or use an existing one to browse the following link pattern: http://[JENKINSHOST]/job/[JOBNAME]/pipeline-syntax/gdsl.
- Copy the entire body text to a newly created file (pipeline.gdsl) under
srcfolder in your groovy project.
- Create new Groovy script and start coding your JenkinsFile. Auto-completion should popup automatically.
Repeat steps 1-2 in case Jenkins' installed plugins, the ones that supports Pipeline DSL, get updated.