-
Notifications
You must be signed in to change notification settings - Fork 30
/
settings.groovy.EXAMPLE
102 lines (96 loc) · 3.05 KB
/
settings.groovy.EXAMPLE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
This is an example settings.groovy file which can be used by the Jervis
bootstrap.
The only required change is updating GITHUB_USER and GITHUB_TOKEN.
*/
//GitHub username
String GITHUB_USER = "samrocketman"
//GitHub personal access token associated with the GitHub username
//Recommended scopes: repo, read:org, admin:repo_hook, user:email
String GITHUB_TOKEN = "CHANGEME"
//Used by webhook callback URLs to increase security
String SHARED_SECRET = "CHANGEME"
controller_settings = [
'admin_email': '[email protected]',
'jnlp_agent_port': 9000,
'controller_labels': 'jervis_generator',
'controller_executors': 1
]
//GitHub credential required for Jervis API communication with api.github.com
credentials = [
[
'credential_type': 'StringCredentialsImpl',
'credentials_id': 'github-token',
'description': 'GitHub Personal Access Token used by Jervis for the GitHub API',
'secret': GITHUB_TOKEN
],
[
'credential_type': 'UsernamePasswordCredentialsImpl',
'credentials_id': 'github-user-and-token',
'description': 'GitHub user and personal access token used by multibranch pipeline jobs for the GitHub API',
'user': GITHUB_USER,
'password': GITHUB_TOKEN
],
[
'credential_type': 'StringCredentialsImpl',
'credentials_id': 'webhook-shared-secret',
'description': 'Webhook shared secret. Protects Jenkins from webhook callback payloads not including this secret.',
'secret': SHARED_SECRET
]
]
pipeline_shared_libraries = [
'Jervis Global Library': [
defaultVersion: 'main',
implicit: true,
allowVersionOverride: false,
includeInChangesets: false,
scm: [
remote: 'https://github.com/samrocketman/jervis.git',
credentialsId: 'github-user-and-token'
]
],
'Extended Jervis Library': [
defaultVersion: 'main',
implicit: true,
allowVersionOverride: false,
includeInChangesets: false,
scm: [
remote: 'https://github.com/samrocketman/jervis-extended-library.git'
]
]
]
github_plugin = [
//hookUrl: 'http://localhost:8080/github-webhook/',
hookSharedSecretId: 'webhook-shared-secret',
servers: [
'Public GitHub.com': [
apiUrl: 'https://api.github.com',
manageHooks: true,
credentialsId: 'github-token',
]
]
]
/*
//configure the GitHub security realm for authentication
//web_uri and api_uri can be deleted if not using GitHub Enterprise
github_realm = [
web_uri: '',
api_uri: '',
client_id: '',
client_secret: '',
oauth_scopes: 'read:org,user:email,repo'
]
*/
/*
//configure matrix authorization
authz_strategy_config = [
strategy: "GlobalMatrixAuthorizationStrategy",
user_permissions: [
'anonymous': ['Job Discover', 'Job ViewStatus'],
'authenticated': ['View Read'],
'group:jenkinsci': ['Overall Read', 'Job Read'],
'samrocketman': ['Overall Administer'],
'admin': ['Overall Administer']
]
]
*/