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
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.