Reputation: 3027
What is a sane development workflow for writing jenkins global pipeline libraries and jenkinsFiles? It's kind of a pain to check in my changes to the global pipeline library and then run a build w/ retry to modify the jenkinsFile, then save the diff if it takes a couple iterations.
Anybody have any recommendations? What do you do?
Upvotes: 1
Views: 245
Reputation: 833
Just based on the small amount of context from your question, I can share what I've learned. YMMV.
@branchname
to the library
declaration in its Jenkinsfile.readJSON
. It throws an error as if you're doing something wrong but it's just broken in the console. I'm sure there are others.I'll come back and add more as i think of it.
Upvotes: 0
Reputation: 37610
There is a 3rd-party unit testing framework for Jenkins pipelines: lesfurets/JenkinsPipelineUnit. This also covers shared libraries and allows you to verify the call stack of your pipeline scripts.
Upvotes: 1