I have a Jenkins job which checks out code from many subversion URLs, however I want the job to checkout from only 1 URL based on a condition. This will prevent unnecessary checkouts and reduce the time taken for the build to complete. Please advise.
I have already looked into this answer, but it did not solve my problem.
if(value == "someValue") {
checkout from svn URL 1
}
else if(value == "someValue2") {
checkout from svn URL 2
} ...
and so on.
You could follow "Converting Conditional Build Steps to Jenkins Pipeline ", which shows an example of declarative pipeline (based on DSL) using conditions: