forked from SFML/SFML-Buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatus.py
45 lines (42 loc) · 1.36 KB
/
status.py
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
def get_www():
from buildbot.plugins import util
from twisted.cred import strcred
import private
return dict(
port = "unix:/home/buildbot/buildbot.sock",
plugins = dict(
waterfall_view = {},
console_view = {},
grid_view = {},
badges = {}
),
auth = util.GitHubAuth(
private.github_client_id,
private.github_client_secret,
apiVersion = 4,
getTeamsMembership = True
),
authz = util.Authz(
allowRules = [
util.AnyControlEndpointMatcher(role = "SFML")
],
roleMatchers = [
util.RolesFromGroups()
]
),
change_hook_dialects = {'base': True, 'github' : {}},
change_hook_auth = [strcred.makeChecker("file:changehook.passwd")]
)
def get_github_status():
from buildbot.process.properties import Interpolate
from buildbot.plugins import reporters
import private
return [
reporters.GitHubStatusPush(
token = private.github_status_token,
startDescription = Interpolate("Build #%(prop:buildnumber)s started."),
endDescription = Interpolate("Build #%(prop:buildnumber)s done."),
context = Interpolate("%(prop:buildername)s"),
verbose = True
)
]