The lazy way is to only set your parameters in your Jenkinsfile. Do not set in Jenkins web interface. (Something will auto-populate into Jenkins, but ignore this.) When you switch to a new branch with different parameters, run a build just long enough for it to pull from SCM. Then abort the build. Then run again. The second run will have the correct parameters.