Created
April 12, 2017 10:10
-
-
Save arehmandev/736daba40a3e1ef1fbe939c6674d7da8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Setup a project | |
2. Add groovy SDK support: | |
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA | |
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl | |
- this will give you the .gdsl file - download this to the src folder of your project. | |
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root | |
5. Now create a .groovy file and begin writing, the autocompletion will work. | |
references: | |
http://stackoverflow.com/questions/41062514/use-gdsl-file-in-a-java-project-in-intellij |
The instructions say to download the gdsl, but where and to which filename?
Download them from a pipeline in Jenkins (link on the left pane), filename doesn't matter. What matters is that IntelliJ recognizes the file as GDSL (thus the "gdsl" file extension. :-)
Thanks for the ideas here, I have added some other pipeline syntax.
https://gist.github.com/Mr-LiuDC/8a1fbe27e8fbd42361185b06085ef4c3
For the issue 'pipeline' cannot be applied to '(groovy.lang.Closure)'
Add: method(name: 'pipeline', type: 'Object', params: [body:'Closure'], doc: 'Pipeline root element')
@karfau I did get it working...see this project I was able to setup - https://github.com/jaydubb12/jenkins-dsl-pipelines
@gsusI i had to set the project sdk set to java 17
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The instructions say to download the gdsl, but where and to which filename?