-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-config.yaml
70 lines (70 loc) · 1.54 KB
/
example-config.yaml
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
serviceHooks:
- event: git.pullrequest.created
resourceFilters:
statuses:
- active
reasons: []
projects: []
repositories: []
sourceRefs:
- refs/heads/feature/*
targetRefs:
- refs/heads/master
templates:
- '{{ .CreatedBy.DisplayName | title | contains "Obama" }}'
rules:
apply:
- |
apiVersion: v1
kind: Namespace
metadata:
name: pr-{{ .PullRequestID }}
labels:
azdPullRequestId: '{{ .PullRequestID }}'
- event: git.pullrequest.updated
resourceFilters:
statuses:
- completed
- abandoned
reasons: []
projects: []
repositories: []
sourceRefs:
- refs/heads/feature/*
targetRefs:
- refs/heads/master
templates:
- '{{ .CreatedBy.DisplayName | title | contains "Obama" }}'
rules:
delete:
- apiVersion: v1
kind: Namespace
selector:
matchLabels:
azdPullRequestId: '{{ .PullRequestID }}'
matchExpressions:
- key: azdPreserve
operator: DoesNotExist
values: []
- event: build.complete
resourceFilters:
statuses: []
reasons:
- manual
projects: []
templates:
- '{{ eq .Definition.DefinitionType "yaml" }}'
rules:
delete:
- apiVersion: v1
kind: Namespace
selector:
matchLabels:
azdBuildId: '{{ .BuildID }}'
matchExpressions:
- key: azdPreserve
operator: DoesNotExist
values: []
- key: azdPullRequestId
operator: DoesNotExist
values: []