Development environment for Pipeline (aka workflow)

349 views
Skip to first unread message

Tom Kierzkowski

unread,
Feb 2, 2016, 5:14:54 PM2/2/16
to Jenkins Users
Hello!  I'll try to break out the question in different parts.

  • What IDE development setup are you using to create/configure/maintain your Pipeline scripts?
  • How do you test your scripts within your IDE/development setup?
  • Any specific resources for setting up a development environment for IntelliJ IDEA (Not married to it, but has more features than Vim :))
As for my current development setup, I've been working within Vim on our Master server and pushing up changes to our Stash/Bitbucket Server repository.  I'm hoping to scale up/improve the process and have more options for code completion, testing, etc for new users to get acclimated and figured I'd reach out to everyone!

Thank you all in advance!

Craig Rodrigues

unread,
Feb 3, 2016, 5:03:54 AM2/3/16
to Jenkins Users
Hi,

It may not be the best or most elegant, but this is what I do:

(1)  I use vim to edit the script.

(2)  For testing, I create a pipeline job, paste the script into the Pipeline script entry field, and run the job.

(3)  When I am done, I check the script into git, and reconfigure the job to use Pipeline script from SCM.

(4)  I often have to re-run the script multiple times, and approve functions in In-process Script Approval
       do to the security sandbox.
--
Craig

Baptiste Mathus

unread,
Feb 3, 2016, 11:22:14 AM2/3/16
to jenkins...@googlegroups.com

Roughly does like Craig, but using intellij instead of bum.

As I associated the Jenkinsfile with groovy type it's helping a bit for completion or to find (basic, since I've not added any pipeline related plugins in the classpath) errors/typos.

-- Baptiste

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAG%3DrPVf3OXJ16aR4b-f6kvLu5ZnuLQQ5-rzpLDyMaiQeL%3DdUTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Tom Kierzkowski

unread,
Feb 3, 2016, 2:52:53 PM2/3/16
to Jenkins Users, m...@batmat.net
Thank you both for your suggestions!

Martin d'Anjou

unread,
Mar 11, 2016, 10:19:04 AM3/11/16
to Jenkins Users
On Tuesday, February 2, 2016 at 5:14:54 PM UTC-5, Tom Kierzkowski wrote:
  • How do you test your scripts within your IDE/development setup?

 I do not use and IDE, but I was shown these two plugins which show a way of testing pipeline scripts:
Both require you to implement your pipeline code as a Jenkins plugin, which is the only way I have found to really test pipeline code. In fact they go one step further, it's almost like they let you define your own DSL, on top of the pipeline DSL.

With the simple-build-for-pipeline-plugin, you can access the env and the build parameters from the simpleBuild {} closure by using "this.env" and "this.PARAM", e.g. simpleBuild { var = this.PARAM }. Tooks me a while to figure this one out.

Martin

Nicolas Geraud

unread,
Mar 15, 2016, 6:34:27 PM3/15/16
to Jenkins Users
I use intellij to write my groovy script

I test my script with a local jenkins running on my laptop. I configure a workflow job that clone my local git repository.
Reply all
Reply to author
Forward
0 new messages