Skip to content

Commit

Permalink
Generate offline documentation during deployment (#142)
Browse files Browse the repository at this point in the history
Co-authored-by: Musee Ullah <[email protected]>
  • Loading branch information
karolyczovek and lae authored Mar 30, 2022
1 parent 5d0e0f7 commit dbead68
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tasks/deploy_netbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@
- netbox_stable and netbox_stable_version is version('2.10.0', '>=')
or netbox_git and _netbox_git_contains_trace_paths.rc == 0

- name: Build the local documentation
shell:
cmd: "{{ netbox_virtualenv_path }}/bin/mkdocs build"
chdir: "{{ netbox_current_path }}"
when:
- netbox_stable and netbox_stable_version is version('3.0.0', '>=')
or netbox_git and _netbox_git_contains_mkdocs.rc == 0

- name: Create a super user for NetBox
shell: "printf '{{ netbox_superuser_script }}' |\
{{ netbox_virtualenv_path }}/bin/python {{ netbox_current_path }}/netbox/manage.py shell"
Expand Down
9 changes: 9 additions & 0 deletions tasks/install_via_git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@
changed_when: False
failed_when: "_netbox_git_contains_trace_paths.rc not in [0, 1]"

- name: Check existence of commit e165dca, introducing mkdocs command during update
shell: 'set -o pipefail; git log --format=%H "{{ netbox_git_version }}" | grep ^7058d6ca5ae2901383874bcea5fedad31e165dca'
args:
chdir: "{{ netbox_git_repo_path }}"
executable: /bin/bash
register: _netbox_git_contains_mkdocs
changed_when: False
failed_when: "_netbox_git_contains_mkdocs.rc not in [0, 1]"

- name: Check existence of commit d87ec82, introducing nightly housekeeping command
shell: 'set -o pipefail; git log --format=%H "{{ netbox_git_version }}" | grep ^d87ec82fe34d92a84ee6f2a97ba0a87a53eed015'
args:
Expand Down

0 comments on commit dbead68

Please sign in to comment.