SVN based Job in Jenkins not working after migrating this from old instance to new instance

Hi, I was running a job based on SVN. Before that I have migrated all my jobs from old Jenkins instance to new instance.The configuartion looks like:

def getTags (svnurl) {
def command = [“svn”,“ls”,“${svnurl}”];
def choiceArray =
def proc = command.execute()
def j = 0
proc.waitFor()

proc.in.eachLine {
    choiceArray << it.substring (0, it.length()-1)
    j = j +1
}
println(choiceArray)

}

getTags(‘subversion Url’);

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.

Hi @Rachel ,

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:

  1. 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.
  2. 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?
  3. 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.
  4. 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.

My $0.02. :person_shrugging: