I have added jenkinsfiles for all the jobs in git repository, all the files renamed as .groovy and in the same directory.
I used Pipeline script from SCM and added the correct script paths as pipelines/.groovy and it works fine.
In this method is there anything I should consider when put all the files in one folder? Like if I do this, will jenkins import all the files in the folder at once and select the correct file?
Performancewise what is the best approach? This or mainatin seperate folders and inside each folder add files named Jenkinsfile?
Even if you separate the jenkinsfiles into separate folders it will still pull the whole repo, therefore pulling everything regardless of whether you put it in a different folder. Ultimately, unless you have thousands of Jenkinsfiles, there will be no noticeable performance impact eitherway.