summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorAric Gardner <agardner@linuxfoundation.org>2015-08-26 16:00:02 -0400
committerAric Gardner <agardner@linuxfoundation.org>2015-08-26 16:07:17 -0400
commit1df5076a99b5b74a0e8500d4e69fdc109a8213bc (patch)
tree4b99bf8ad56da65f34a89ca1a935308b43306caa /jjb
parent7f36eaadd656d27c095df4349b759b5eb5450016 (diff)
Adding initial docs, script and logic for releng project
Change-Id: Ie5bebf61b5f539d31c4c270b3f86b68b7a3ff2c9 Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Diffstat (limited to 'jjb')
-rwxr-xr-xjjb/releng/docu-build-new.sh31
-rw-r--r--jjb/releng/releng.yml4
2 files changed, 33 insertions, 2 deletions
diff --git a/jjb/releng/docu-build-new.sh b/jjb/releng/docu-build-new.sh
new file mode 100755
index 000000000..0062f8e17
--- /dev/null
+++ b/jjb/releng/docu-build-new.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+clean() {{
+if [[ -d docs/output ]]; then
+rm -rf docs/output
+echo "cleaning up output directory"
+fi
+}}
+
+trap clean EXIT TERM INT SIGTERM SIGHUP
+
+directories=()
+while read -d $'\n'; do
+ directories+=("$REPLY")
+done < <(find docs/ -name 'index.rst' -printf '%h\n' | sort -u )
+
+for dir in "${{directories[@]}}"; do
+echo
+echo "#############################"
+echo "Building DOCS in ${{dir##*/}}"
+echo "#############################"
+echo
+
+if [[ ! -d docs/output/"${{dir##*/}}/" ]]; then
+ mkdir -p docs/output/"${{dir##*/}}/"
+fi
+
+sphinx-build -b html -E -c docs/etc/ ""$dir"/" docs/output/"${{dir##*/}}/"
+
+done
+
diff --git a/jjb/releng/releng.yml b/jjb/releng/releng.yml
index 40e5b6650..c24fcb065 100644
--- a/jjb/releng/releng.yml
+++ b/jjb/releng/releng.yml
@@ -77,5 +77,5 @@
pattern: 'jjb/**'
builders:
- - shell: |
- echo "Documentation generation logic goes here"
+ - shell:
+ !include-raw docu-build-new.sh