Skip to content

Commit

Permalink
Add script to clone napalm-ansible repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ogenstad committed Nov 21, 2017
1 parent bf69032 commit d305508
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ tags

docs/integrations/ansible/modules/napalm_*/
docs/integrations/ansible/modules/source/*.json
docs/napalm_ansible_repo/
20 changes: 20 additions & 0 deletions docs/build-ansible-module-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

CWD=`pwd`
MODULES_OUTPUT="$CWD/integrations/ansible/modules/source"



git clone https://github.com/napalm-automation/napalm-ansible.git napalm_ansible_repo
cd napalm_ansible_repo

# Change to master after next napalm-ansible release
git checkout develop

pip install -r requirements-dev.txt
pip install .
py.test
cp module_docs/* $MODULES_OUTPUT/

cd $CWD

4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ['_build', 'napalm_ansible_repo']

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand Down Expand Up @@ -310,7 +310,7 @@ def build_napalm_ansible_module_docs(app):
"""Create documentation for Ansible modules."""

# Add script to clone napalm-ansible repo
status = 0
status = subprocess.call("./build-ansible-module-docs.sh", stdout=sys.stdout, stderr=sys.stderr)

if status != 0:
print("Something bad happened when processing the Ansible modules.")
Expand Down

0 comments on commit d305508

Please sign in to comment.