danielbeck, the jobs of a Multibranch Pipeline. If I ask for all jobs I get the folder of the Multibranch Pipeline, but not it's content.
Martin Heinzerling
added a comment - - edited danielbeck , the jobs of a Multibranch Pipeline. If I ask for all jobs I get the folder of the Multibranch Pipeline, but not it's content.
danielbeck This is correct, you're unable to get the configured multibranch workflow branches
$ java -jar ~/jenkins-cli/jenkins-cli.jar -auth @~/jenkins-cli/auth.txt -s "http://localhost:8080/" -webSocket list-jobs | grep SSL_daily
SSL_daily
$ java -jar ~/jenkins-cli/jenkins-cli.jar -auth @~/jenkins-cli/auth.txt -s "http://localhost:8080/" -webSocket list-jobs SSL_daily
ERROR: No view or item group with the given name 'SSL_daily' found.
Sven Kirmess
added a comment - danielbeck This is correct, you're unable to get the configured multibranch workflow branches
$ java -jar ~/jenkins-cli/jenkins-cli.jar -auth @~/jenkins-cli/auth.txt -s "http://localhost:8080/" -webSocket list-jobs | grep SSL_daily
SSL_daily
$ java -jar ~/jenkins-cli/jenkins-cli.jar -auth @~/jenkins-cli/auth.txt -s "http://localhost:8080/" -webSocket list-jobs SSL_daily
ERROR: No view or item group with the given name 'SSL_daily' found.
gdj Could you provide the "full name" of a branch job in your environment so the output makes sense to users not knowing it?
Daniel Beck
added a comment - gdj Could you provide the "full name" of a branch job in your environment so the output makes sense to users not knowing it?
Sven Kirmess
added a comment - SSL_daily is the multibranch workflow project, which configures the branches from git. The URL for the full job looks like so: http://example.com:8090/job/SSL_daily/job/master/
If you try to build just SSL_daily it'll fail.
$ java -jar ~/jenkins-cli/jenkins-cli.jar -auth @~/jenkins-cli/auth.txt -s "http://localhost:8080/" -webSocket build SSL_daily
ERROR: No such job 'SSL_daily'; perhaps you meant 'SSL_daily/master'?
You also have to specify the branch for build to work.
$ java -jar ~/jenkins-cli/jenkins-cli.jar -auth @~/jenkins-cli/auth.txt -s "http://localhost:8080/" -webSocket ~proci/bin/jenkins-cli build SSL_daily/master
$ echo $?
0
Interesting. I see where this is coming from, ComputedFolder isn't a ModifiableTopLevelItemGroup and that is what ListJobsCommand expects. There's no TopLevelItemGroup or similar more applicable interface, unfortunately.
Daniel Beck
added a comment - Interesting. I see where this is coming from, ComputedFolder isn't a ModifiableTopLevelItemGroup and that is what ListJobsCommand expects. There's no TopLevelItemGroup or similar more applicable interface, unfortunately.
Sven Kirmess
added a comment - Does that mean that can't easily be fixed?
The branches are available from the script console.
hudson.model.Hudson.instance.getItemByFullName('SSL_daily').getAllJobs()
Result: [org.jenkinsci.plugins.workflow.job.WorkflowJob@56d136ee[SSL_daily/master]]
What job type are you specifically referring to?