Environment
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Operations Center
-
CloudBees CI (CloudBees Core) on traditional platforms - Client controller
-
CloudBees CI (CloudBees Core) on traditional platforms - Operations Center
-
CloudBees Jenkins Enterprise
-
CloudBees Jenkins Enterprise - Managed controller
-
CloudBees Jenkins Enterprise - Operations center
Resolution
Go to Script Console under Manage Jenkins, this script will print the name of all jobs including jobs inside of a folder and the folders themselves:
Jenkins.instance.getAllItems(AbstractItem.class).each { println it.fullName + " - " + it.class };
This script will print the name of all jobs including jobs inside of a folder, but not the folders themselves.
Jenkins.instance.getAllItems(Job.class).each{ println it.name + " - " + it.class }
This script will recursively print the name of all jobs implementing the AbstractProject class, i.e. Freestyle and Maven jobs.
Jenkins.instance.getAllItems(AbstractProject.class).each {it -> println it.fullName; }
This script will recursively print the name of all the Multibranch jobs.
Jenkins.instance.getAllItems(org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject).each {it -> println it.fullName; }