Last active
July 10, 2020 02:32
-
-
Save solvingj/d60146d73ca127dcccb32a47a7652822 to your computer and use it in GitHub Desktop.
Jenkins CASC for organization folder: Whats wrong?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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