-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
79 lines (73 loc) · 2.33 KB
/
main.yml
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
---
webhook_version: 2.6.10
webhook_download:
url: "https://oss.help/builds/pub/webhook/{{ webhook_version }}/webhook"
checksum: "https://oss.help/builds/pub/webhook/{{ webhook_version }}/SHA256SUMS"
webhook_user: webhook
webhook_extra_groups: []
webhook_dirs:
download: /tmp
scripts: /usr/local/bin
binary: /usr/local/sbin
conf: /etc/webhook
logs: /var/log/webhook
templates: /usr/local/osshelp/webhook
scripts_source: scripts
webhook_default_setup: false
webhook_default_sudoers: true
webhook_params:
hotreload: true
listen: 0.0.0.0
port: 9000
prefix: webhook
verbose: true
headers: []
webhook_templates: []
webhook_sudo_scripts: [ lxhelper ]
webhook_disable_default_hooks: false
webhook_custom_hooks: []
webhook_default_hooks:
- id: lxhelper-deployment
response-message: Starting LXHelper deployment...
execute-command: "{{ scripts_dir | default('/usr/local/bin', true) }}/webhook-lxhelper-deployment"
command-working-directory: /tmp
include-command-output-in-response: true
include-command-output-in-response-on-error: true
trigger-rule-mismatch-http-response-code: 400
pass-arguments-to-command:
- { source: payload, name: params.manifest }
- { source: payload, name: params.transport }
- { source: payload, name: params.target }
- { source: payload, name: params.profile }
trigger-rule:
and:
- match:
type: value
value: "{{ webhook_lxhelper_deployment['token'] | default('VeryUniqueStingHere',true) }}"
parameter:
source: payload
name: params.token
- match:
type: regex
regex: "^(http(s?):\\/\\/|\\/)[\\w+\\.\\-\\/\\@\\:]+\\w+\\.yml$"
parameter:
source: payload
name: params.manifest
- match:
type: regex
regex: "^(http|s3)$"
parameter:
source: payload
name: params.transport
- match:
type: regex
regex: "{{ webhook_lxhelper_deployment['target_regex'] | default('^demo$',true) }}"
parameter:
source: payload
name: params.target
- match:
type: regex
regex: "^([\\w\\d-]+|)$"
parameter:
source: payload
name: params.profile