Here's some links to stuff I found useful. It isn't easy to debug them.
The addition of println statements here and there is old fashioned but does
work however slowly.
Using the way Jenkins lets you put a part of a script in a test job with
the inline editor (when you have a pipeline job without a Jenkinsfile) can
help you see how things work with a shorter turnaround. But it only helps
sometimes.

https://jenkins.io/doc/book/pipeline/development/
https://dzone.com/articles/10-tips-to-debug-jenkins-pipelines
https://github.com/jenkinsci/JenkinsPipelineUnit


On Mon, Apr 20, 2020 at 8:24 AM Jérôme Godbout <godbo...@amotus.ca> wrote:

> I have a test project pipeline where I copy my code and test it there,
> only the part I want to test, avoid the long checkout, I copy the source
> into the workspace directly. The painfull part is testing with interaction
> with external server (that actually deploy, AppCenter, Azure, Amazone
> Cloud, Artifactory…). I need to up a dummy server and test on it while
> testing my script code.
>
>
>
>
>
> *From:* 'Christoph Fetzer' via Jenkins Users <
> jenkinsci-users@googlegroups.com>
> *Sent:* April 20, 2020 7:37 AM
> *To:* Jenkins Users <jenkinsci-users@googlegroups.com>
> *Subject:* Re: How do you debug Jenkins pipelines?
>
>
>
> Sorry for the delay, I've been on vacation.
>
> With tracing I understood adding output to the code that helps you
> understanding what happens e.g. variable content,....
>
> For sure that's not the most efficient way and in case your pipeline runs
> for a time it might get boring....
>
>
> Am Donnerstag, 9. April 2020 20:55:10 UTC+2 schrieb Yeikel:
>
> What do you mean with "tracing" ? Running it on an instance?
>
>
>
> On Thu, Apr 9, 2020, 2:48 PM ch.fetzer <ch.f...@gmx.net> wrote:
>
> In jenkinsfile editor of eclipse I noticed some function to give a
> jenkinsfile to Jenkins for validation but I did not get this working up to
> now.
>
>
>
> My method to make it work is tracing currently.
>
>
>
> -------- Ursprüngliche Nachricht --------
>
> Von: Yeikel <yeik...@gmail.com>
>
> Datum: 09.04.20 20:21 (GMT+01:00)
>
> An: jenkins...@googlegroups.com
>
> Betreff: How do you debug Jenkins pipelines?
>
>
>
> Besides running the pipeline in a Jenkins instance, is there any other way
> to validate Jenkins pipelines? I  sometimes see myself running a long
> pipeline after a refactor to see a runtime exception (like invalid methods)
>
>
>
> I imagine that setting breakpoints is wishful thinking, but is it possible?
>
>
>
> Thanks!
>
> --
> 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 jenkins...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAMMhyA1%2Bt%2BiMWiGN72T%2BWh17SwiDxvq3wrL-brzOYfzVwL511Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAMMhyA1%2Bt%2BiMWiGN72T%2BWh17SwiDxvq3wrL-brzOYfzVwL511Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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 jenkins...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/1MGhuU-1jZF4g48HK-00DlcT%40mail.gmx.com
> <https://groups.google.com/d/msgid/jenkinsci-users/1MGhuU-1jZF4g48HK-00DlcT%40mail.gmx.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/342997a3-17de-4546-a710-4674294258d0%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/342997a3-17de-4546-a710-4674294258d0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB28971A4CB120F4C6B1F7FF94CDD40%40QB1PR01MB2897.CANPRD01.PROD.OUTLOOK.COM
> <https://groups.google.com/d/msgid/jenkinsci-users/QB1PR01MB28971A4CB120F4C6B1F7FF94CDD40%40QB1PR01MB2897.CANPRD01.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>
> .
>


-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAA4vtDS-J3gnPDgvHta%2B4-0JDKY_NX3%2BALPwU0x0GA_757SXrw%40mail.gmail.com.

Reply via email to