Jenkins Cli Import / Export is not working for Folder

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Jenkins Cli Import / Export is not working for Folder

lavanya anbu
Hi All, I am new to jenkins and using Jenkins ver. 2.190.2 which is installed in Azure Kubernetes version 1.14.6 . I am trying to export the jenkins jobs using the command line using a simple script by passing the job name. 

Export_jobs()
{
mkdir JOB
while read -r i
do
java -jar jenkins-cli.jar -s $URL -auth $username:$password get-job "$i" </dev/null > JOB/$i.xml
done < list_jobs.txt

}

Jenkins has a folder within that there are multiple jobs, the above export command only exports the folder but not the jobs. Is there any other command i should use?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/592e3c2b-25c4-4582-9669-f0533d0b507c%40googlegroups.com.