I have Jenkinsfile (Pipeline script) in root of Master branch.
Code has below stages: 1) checkout 2) Build-test 3) Archive artifact 4) Deploy
We deploy to QA and PROD env from master branch and both environments have different configuration and right now we have single Jenkinsfile.
I need suggestion what is the best approach for deployment ? 1. Should i create folder and sub-folder and keep respective Jenkinsfile 2. Use some environment variables that can be passed on run-time for respective environment
Any other idea .. please help me with your suggestions i want to make pipeline script reusable ,