Skip to content

Instantly share code, notes, and snippets.

@odavid
Created April 29, 2018 19:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odavid/10e2f657407c8d910df1538ae273d9fe to your computer and use it in GitHub Desktop.
Save odavid/10e2f657407c8d910df1538ae273d9fe to your computer and use it in GitHub Desktop.
github-org-folder-example-jenkins
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