So I have a Jenkinsfile defining a build pipeline and then a Jenkins job (not pipeline) with a very simple deployment script for our Docker stacks.
Seeing that Jenkinsfiles can become as complex and powerful as one's coding skills are (seeing that they can groovy fairly well), would I have everything in one Jenkinsfile or have multiple Jenkinsfiles?
Consider this theoretical process:
Development > Build artefact > Build Docker image > Deploy Docker container to testing > tests & QA > deploy to staging > have client check it > deploy to production
Would all of that go into one Jenkinsfile and run different steps of the pipeline according to user input like
"which stages should be performed? Please specify: Build artefact, build Docker Image, ..."
This would result in a complex Jenkinsfile but you'd only have one single file.
Or should this process be split into multiple Jenkinsfiles with multiple Jenkins jobs/pipelines for each Jenkinsfile to do a part of the process?