Skip to content

Commit 93d8ed6

Browse files
committed
implement support for webhook in docsbuild
see python/docsbuild-scripts#101
1 parent 4fa0175 commit 93d8ed6

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

pillar/prod/top.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ base:
4343

4444
'docs':
4545
- match: nodegroup
46+
- firewall.http
4647
- firewall.rs-lb-backend
4748
- groups.docs
4849
- secrets.docs
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GITHUB_WEBHOOK_SECRET={{ github_webhook_secret }}

salt/docs/init.sls

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,39 @@ docsbuild:
3232
- require:
3333
- group: docs
3434

35+
/srv/docsbuild/.config/environment.d:
36+
file.directory:
37+
- user: docsbuild
38+
- group: docsbuild
39+
- mode: 750
40+
- require:
41+
- user: docsbuild
42+
43+
/srv/docsbuild/.config/environment.d/github-webhook-secret.conf:
44+
file.managed:
45+
- user: docsbuild
46+
- group: docsbuild
47+
- mode: 640
48+
- require:
49+
- file: /srv/docsbuild/.config/environment.d
50+
- template: jinja
51+
- source: salt://docs/config/github-webhook-secret-environment
52+
- context:
53+
github_webhook_secret: {{ pillar.get('docs', {}).get('github', {}).get('hook', {}).get('secret', '') }}
54+
55+
/var/lib/systemd/linger/docsbuild:
56+
file.exists:
57+
- user: root
58+
- group: root
59+
- mode: 0644
60+
61+
/var/run/docsbuild:
62+
file.directory:
63+
- user: docsbuild
64+
- mode: 755
65+
- require:
66+
- user: docsbuild
67+
3568
docsbuild-scripts:
3669
git.latest:
3770
- name: https://github.com/python/docsbuild-scripts.git

0 commit comments

Comments
 (0)