Complete the code to create a new Organization Folder in Jenkins using the Jenkins CLI.
java -jar jenkins-cli.jar -s http://jenkins.example.com create-job [1] < orgfolder-config.xmlThe name MyOrgFolder is used to create an Organization Folder. Other names refer to different job types.
Complete the code to list all Organization Folders in Jenkins using the REST API.
curl -s http://jenkins.example.com/api/json?tree=jobs[name,[1]] | jq '.'
The class field helps identify Organization Folders by their job type in the JSON output.
Fix the error in the Jenkins pipeline script to create an Organization Folder using the Jenkins Job DSL plugin.
organizationFolder('[1]') { displayName('My Organization') }
The folder name my-org-folder is valid for an Organization Folder. Other options refer to different job types.
Fill both blanks to configure an Organization Folder with a source and a strategy in Jenkins Job DSL.
organizationFolder('MyOrg') { [1] { id('github') } [2] { strategy('AllBranches') } }
sources defines the source repositories, and folderProperties can define strategies or properties for the folder.
Fill all three blanks to define an Organization Folder with a GitHub source, a branch discovery strategy, and a trigger in Jenkins Job DSL.
organizationFolder('MyOrg') { sources { [1] { id('github') repoOwner('my-org') repository('my-repo') } } [2] { strategy('DiscoverBranches') } [3] { cron('H/15 * * * *') } }
github defines the GitHub source, folderProperties sets the branch strategy, and triggers configures periodic scanning.