When I execute this script in old server I get the list of folder names, but when I execute on new server I’m getting empty array. I cheked with username and password of SVN in credentials and it looks good. Please let me know if I missed anything else while recovering old jobs. How do this job get the login information? Please guide me.
What was the version of Jenkins you were using, and what is the new one?
Would you have any logs to share?
When migrating Jenkins jobs from one instance to another, it’s important to ensure that all the necessary configurations and credentials are properly transferred. In the case of SVN-based jobs, I think there are a few things you might want to check:
Verify SVN Plugin: Make sure that the SVN plugin is installed and updated on your new Jenkins instance. You can check this in the “Manage Jenkins/Plugins/Installed Plugins” section.
SVN Credentials: Check if the SVN credentials are properly configured in the new Jenkins instance. Open the job configuration and verify that the correct SVN credentials are selected. I’m almost sure it’s okay, as you should get an error if not, right?
Verify SVN URL: Double-check the SVN URL used in your script (svnurl). Ensure that it is correct and accessible from the new Jenkins server. You can try executing the same SVN command (svn ls svnurl) directly on the new server’s command line to confirm if it returns the expected results. I think this one is optional, as you should get an error and not an empty array.
Verify Workspace: Ensure that the job’s workspace directory is properly set up on the new Jenkins instance and that it corresponds to the correct location on the server. The workspace is where Jenkins checks out the source code from SVN.