Created
April 29, 2018 19:18
-
-
Save odavid/10e2f657407c8d910df1538ae273d9fe to your computer and use it in GitHub Desktop.
github-org-folder-example-jenkins
This file contains hidden or 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
security: | |
realm: jenkins_database | |
adminPassword: admin | |
credentials: | |
my-github-api-cred: | |
type: userpass | |
username: <YOUR_GITHUB_USER> | |
password: <YOUR_GITHUB_PASS> | |
job_dsl_scripts: | |
- | | |
organizationFolder('my-github-org'){ | |
description('This contains branch source jobs for GitHub') | |
organizations{ | |
github{ | |
credentialsId('my-github-api-cred') | |
repoOwner('<YOUR_GITHUB_USER>') | |
} | |
} | |
// See https://issues.jenkins-ci.org/browse/JENKINS-46202 | |
configure { | |
def traits = it / 'navigators' / 'org.jenkinsci.plugins.github__branch__source.GitHubSCMNavigator' / 'traits' | |
traits << 'org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait' { | |
strategyId(1) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment