How do you iteratively work on a Jenkinsfile?

44 views
Skip to first unread message

pisymbol

unread,
Feb 1, 2018, 2:21:06 PM2/1/18
to Jenkins Users
Sorry, I know this sounds extremely basic:

But how to you iteratively work on the build without actually checking in the Jenkinsfile? I'd can work on a basic Pipeline project and edit/run/fix Groovy syntax etc without an issue.

But for other projects, like the Multibranch Pipeline once it wants a Jenkins file in the source tree as per the scan. (note: our source trees are currently SVN).

So how do you work on the build without checking in the Jenkinsfile a half a dozen times before you get the file right? This has me very confused.

Thanks!

-aps

Slide

unread,
Feb 1, 2018, 2:51:47 PM2/1/18
to jenkins...@googlegroups.com
If you look on the left side of the Jenkins area when looking at the job, there is an option called "Replay" that allows you to edit the scripts and rerun with the same setup. You can play with the scripts and stuff there and then grab the changes and check them in.

--
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/e27f6539-f5ed-48bb-9971-2752ea52243a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oleg Nenashev

unread,
Feb 2, 2018, 7:28:26 AM2/2/18
to Jenkins Users
For this purpose I am using FileSystem SCM plugin to retrieve scripts without committing + local Docker snapshot of the production instance. You can find some info about my approach in these slides. Slides are a bit outdated, but the demo is more or less up to date: https://github.com/oleg-nenashev/demo-jenkins-config-as-code

Hopefully it helps,
Oleg

четверг, 1 февраля 2018 г., 20:51:47 UTC+1 пользователь slide написал:

pisymbol

unread,
Feb 2, 2018, 3:31:49 PM2/2/18
to Jenkins Users


On Friday, February 2, 2018 at 7:28:26 AM UTC-5, Oleg Nenashev wrote:
For this purpose I am using FileSystem SCM plugin to retrieve scripts without committing + local Docker snapshot of the production instance. You can find some info about my approach in these slides. Slides are a bit outdated, but the demo is more or less up to date: https://github.com/oleg-nenashev/demo-jenkins-config-as-code

Hopefully it helps,
Oleg


I will check this out! Thanks! 

Joshua Noble

unread,
Feb 3, 2018, 7:20:14 PM2/3/18
to Jenkins Users
+1 for the Replay functionality. It works great. It should be noted that sometimes you won’t see it available on failed build runs.
Reply all
Reply to author
Forward
0 new messages