Skip to content

Commit 7fcd4a3

Browse files
authored
Docsbuild config (#561)
configure docsbuild scripts from file not env
1 parent 6ae6ea4 commit 7fcd4a3

File tree

2 files changed

+15
-22
lines changed

2 files changed

+15
-22
lines changed

salt/docs/config/docsbuild-scripts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[env]
2+
SENTRY_DSN = "{{ sentry_dsn }}"
3+
FASTLY_SERVICE_ID = "{{ fastly_service_id }}"
4+
FASTLY_TOKEN = "{{ fastly_token }}"
5+
PYTHON_DOCS_ENABLE_ANALYTICS = "1"

salt/docs/init.sls

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -67,29 +67,17 @@ virtualenv-dependencies:
6767
- onchanges:
6868
- git: docsbuild-scripts
6969

70-
docsbuild-analytics:
71-
cron.env_present:
72-
- user: docsbuild
73-
- name: PYTHON_DOCS_ENABLE_ANALYTICS
74-
- value: 1
75-
76-
docsbuild-sentry:
77-
cron.env_present:
78-
- user: docsbuild
79-
- name: SENTRY_DSN
80-
- value: {{ pillar.get('docs', {}).get('sentry', {}).get('dsn', '') }}
81-
82-
docsbuild-fastly-service-id:
83-
cron.env_present:
84-
- user: docsbuild
85-
- name: FASTLY_SERVICE_ID
86-
- value: {{ pillar.get('docs', {}).get('fastly', {}).get('service_id', '') }}
87-
88-
docsbuild-fastly-token:
89-
cron.env_present:
70+
/etc/xdg/docsbuild-scripts:
71+
file.managed:
72+
- source: salt://docs/config/docsbuild-scripts
73+
- template: jinja
74+
- context:
75+
sentry_dsn: {{ pillar.get('docs', {}).get('sentry', {}).get('dsn', '') }}
76+
fastly_service_id: {{ pillar.get('docs', {}).get('fastly', {}).get('service_id', '') }}
77+
fastly_token: {{ pillar.get('docs', {}).get('fastly', {}).get('token', '') }}
9078
- user: docsbuild
91-
- name: FASTLY_TOKEN
92-
- value: {{ pillar.get('docs', {}).get('fastly', {}).get('token', '') }}
79+
- group: docsbuild
80+
- mode: "0440"
9381

9482
docsbuild-no-html:
9583
cron.present:

0 commit comments

Comments
 (0)