/jenkins-dsl-pipelines

Sample repo demonstrating use of Jenkins DSL Pipelines via IntelliJ that will support code completion and validation

Primary LanguageGroovy

jenkins-dsl-pipelines

standard-readme compliant

Features

  • Jenkins DSL Pipleline / IntelliJ Type Ahead
  • Jenkins DSL Pipleline Type validation

Screen Shot 2022-08-10 at 1 35 07 PM

Overview

Sample repo demonstrating use of Jenkins DSL Pipelines via IntelliJ that will support code completion and validation.

What is different about this repository?

  • This repository is not a passive gist, but a full / working example of the configuration needed to get this working in the IntelliJ IDE
  • Includes additional code within the jenkins.gdsl file that will help to avoid a bunch of distracting errors in the .gdsl file
  • I have expanded and extended a number of closures, properties and other items beyond what is provided OOTB via Jenkins
  • I have also expanded upon the great work of a few other Github users @ramna2913, @Mr-LiuDC and @ggarcia24

IDE Setup

  1. Clone repository
  2. Add groovy SDK support: https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
  3. Ensure IDE / project config has java configured.
  4. Navigate to the .gdsl file and execute the CTA "Activate Back"

How does it work?

Check out this blog article, as it already provides a good baseline and background.

https://st-g.de/2016/08/jenkins-pipeline-autocompletion-in-intellij