jenkins - Is it possible to place a breakpoint inside of a Jenkinsfile for debugging? -


right sorting out workflow using jenkinsfiles bit slow since have create job, , run ui in order feedback on whether or not works.

i wondering if there way place breakpoint inside of jenkinsfile way toy around , feel libraries / methods / variables available.

is possible? or have stick current process of editing jenkinsfile in jenkins ui , re-running build?

--edit--

i've found workflow works little faster making changes through ui. ssh server within jenkins exposes command called declarative-linter , 1 called replay-pipeline. develop script locally , rerun these commands after make edit.

so basically, workflow this:

  • edit script liking
  • run lint check. have jenkins setup in ssh config file, run using powershell:

gc jenkinsfile | ssh jenkins declarative-linter

  • run newly changed script replaying pipeline build:

gc jenkinsfile | ssh jenkins replay-pipeline <name of job branch name>

  • run console command tail logs:

ssh jenkins console <name of job branch name>

all did wrap these lines powershell function , after edit script locally run 1 command perform validate change. it's more complicated, turn around time bit faster using jenkins ui, plus edit script using favorite editor. hopefully, in future, there better tooling around debugging jenkinsfiles.

this way currently. although know there requests future additions in direction (pipeline debugger). there options debug directly java, not trivial setup done.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -