According to this github repo it is possible to test the Jenkinsfile, but this is run by Jenkins and if there are issues it will not run. Should one run such unit test in another CI? What are best practices to solve this issue?


1 Answer 1


Unit testing in an alternate CD/CI platform would be overkill in every situation I've built one. The shared-pipeline code repo you connect to Jenkins will be triggered by a Jenkinsfile. I suggest you define any and all testing in that particular Jenkinsfile - and keep this one simple enough that extensive testing of the Jenkinsfile defining tests for your Jenkinsfile does not also need a Jenkinsfile defining tests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.