Skip to content

Instantly share code, notes, and snippets.

@solvingj
Last active July 10, 2020 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solvingj/d60146d73ca127dcccb32a47a7652822 to your computer and use it in GitHub Desktop.
Save solvingj/d60146d73ca127dcccb32a47a7652822 to your computer and use it in GitHub Desktop.
Jenkins CASC for organization folder: Whats wrong?
jobs:
- script: >
organizationFolder('gitbucket') {
description("All repos with Jenkinsfiles discovered on gitbucket")
displayName("gitbucket")
organizations {
github {
apiUri("http://gitbucket/api/v3")
credentialsId('DEMO_GIT_CREDS')
repoOwner('root')
}
}
configure { node ->
def traits = it / navigators / 'org.jenkinsci.plugins.github__branch__source.GitHubSCMNavigator' / traits
traits << 'org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait' {
strategyId 1
}
traits << 'org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait' {
strategyId 2
trust(class: 'org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustEveryone')
}
traits << 'org.jenkinsci.plugins.github__branch__source.OriginPullRequestDiscoveryTrait' {
strategyId 2
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment