Get list of branches in Jenkins multibranch pipeline
问题 The Blue Ocean interface to a Jenkins multibranch pipeline project shows several branches that were automatically created. Is there a programmatic way to list the branches in the pipeline from code to be added to a Jenkinsfile? This question asks about Jenkins Project branch information located inside the Jenkins application object model, which should be accessible via the Jenkins API or CLI. I looked at all the variables that are available at http://<jenkins-home>/env-vars.html/ , but none