-
Bug
-
Resolution: Duplicate
-
Blocker
-
Jenkins 2.60.2
GitHub Branch Source Plugin 2.2.3
Job DSL Plugin 1.64
Using the job DSL plugin v. 1.64, I can't automatically discover all my repositories and all it's branches within my GitHub organization folder.
I used the job DSL plugin v. 1.61 before.
organizationFolder('myOrg') { triggers { periodic(10) } organizations { github { apiUri("") repoOwner("myOrg") scanCredentialsId("github") checkoutCredentialsId("github") } } }
This is the configuration view after executing the above script
scanCredentialsId("") and checkoutCredentialsId("") are now deprecated and replaced by credentialsId("github"). Now, the credentials work. But discovering all repositories and their branches doesn't seem to be possible anymore because the "includes", "excludes" methods also have been deprecated.
Now, with the following, fixed script, I don't get all the branches anymore:
organizationFolder('myOrg') { triggers { periodic(10) } organizations { github { repoOwner("myOrg") credentialsId("github") } } }
This is the configuration page after executing the new script:
I now manually need to add the checkout behaviour "Discover branches -> All branches"
How can I automatically discover all repos and their branches using the DSL script?
I also tried the "fromSource" syntax as this one seems to have more options.
organizationFolder('myOrg') { triggers { periodic(10) } organizations { fromSource { name("myOrg") sources { github { credentialsId("github") repoOwner("myOrg") repository("") } } } } }
As you can see, I have tried to leave the string in the repository("") method empty, hoping that would cause it to discover all repos within my organization. I also tried asterisk: repository("*") which also led to an error.
- duplicates
-
JENKINS-45504 Add @Symbol annotations to traits
- Closed
- is blocked by
-
JENKINS-26535 DescribableHelper does not handle wildcards well
- Open
- is related to
-
JENKINS-45688 Unable to set extensions for Git SCM Source via DSL
- Closed
-
JENKINS-45860 Support traits for ScmNavigators
- Closed