/
jail-docs.yml
54 lines (52 loc) · 2.01 KB
/
jail-docs.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
---
- name: configure docs
hosts: docs
gather_facts: no
connection: local
sudo: yes
vars:
# sphinx is installed into a separate virtual environment
env_name: doctools
# This needs to be changed to `docs.buildbot.net` together with DNS change.
web_host_name: "docs.buildbot.net"
bbdocs_dir: "bbdocs"
roles:
- base
- role: user
user_id: "{{ worker_account }}"
user_name: Buildbot Worker Account
- role: virtualenv
venv_user: "{{ worker_account }}"
venv_home_dir: "{{ getent_passwd[worker_account].4 }}"
venv_name: "{{ env_name }}"
venv_python_packages:
- 'sphinx==1.2.2'
- 'Pygments==2.0.1' # This seems to be redundant since sphinx depends on Pygments
- role: simple-buildout
repo_url: git://github.com/buildbot/bbdocs.git
repo_branch: master
target_user: "{{ worker_account }}"
target_dir: "{{ getent_passwd[worker_account].4 }}/{{ bbdocs_dir }}"
- role: simple-buildout
repo_url: git://github.com/buildbot/buildbot.git
repo_branch: master
target_user: "{{ worker_account }}"
target_dir: "{{ getent_passwd[worker_account].4 }}/buildbot"
target_commands:
# `command` module does not allow to set env variables, nor expands them,
# so let's use make's variables.
- "make -C master/docs PATH:={{ getent_passwd[worker_account].4 }}/{{ env_name }}/bin:$(PATH) VERSION=latest"
- "find master/docs/_build/html -name '*.html' -exec python2 {{ getent_passwd[worker_account].4 }}/{{ bbdocs_dir }}/add-tracking.py {} ;"
- "ln -sf {{ getent_passwd[worker_account].4 }}/buildbot/master/docs/_build/html {{ getent_passwd[worker_account].4 }}/{{ bbdocs_dir }}/docs/latest"
- role: nginx
nginx_template: static
server_name: "{{ web_host_name }}"
server_root: "{{ getent_passwd[worker_account].4 }}/{{ bbdocs_dir }}/docs"
ssl: True
- role: nginx
nginx_template: domain-redirect
server_name: redirects
server_names:
- docs.buildbot.org
target_url: "http://{{ web_host_name }}"
# vim:ts=2:sw=2:noai:nosi