summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Laza <vlaza@cloudbasesolutions.com>2015-04-30 12:36:33 +0300
committerVictor Laza <vlaza@cloudbasesolutions.com>2015-04-30 13:41:50 +0300
commit39d46e2103ad340fefd32795d7b79d6af5ee9719 (patch)
treefd0b15b90a4796e033c797677be793b208c80c2b
parent0cca29982d65e828244aa9e18c0f8f8b0bc66378 (diff)
Update opnfvdocs/docs/enable_docu_gen.rst with latest scripts
JIRA: DOCS-25 - Update opnfvdocs/docs/enable_docu_gen.rst with latest scripts that extract project name from git rather that hard-coded Change-Id: Iadb6fdf80653f45926037c6898e44ea18c33ee6c Signed-off-by: Victor Laza <vlaza@cloudbasesolutions.com>
-rw-r--r--docs/enable_docu_gen.rst30
-rw-r--r--docs/other_options_for_docu_gen.rst9
2 files changed, 21 insertions, 18 deletions
diff --git a/docs/enable_docu_gen.rst b/docs/enable_docu_gen.rst
index d75f592b8..9a77da01e 100644
--- a/docs/enable_docu_gen.rst
+++ b/docs/enable_docu_gen.rst
@@ -46,14 +46,19 @@ Enter the project settings::
cd releng/jjb/<project>/
-**Create build-upload-docu.sh**
+**Create the verify & build scripts**
The script is the same for most of the projects and you can just copy it under your project in releng/jjb/<project>/
-example: cp releng/jjb/opnfvdocs/build-docu.sh releng/jjb/<your-project>/::
+example: cp releng/jjb/opnfvdocs/build-docu.sh releng/jjb/<your-project>/
+
+**docu-build.sh**::
#!/bin/bash
- project="functest"
+ set -e
+ set -o pipefail
+
+ project="$(git remote -v | head -n1 | awk '{{print $2}}' | sed -e 's,.*:\(.*/\)\?,,' -e 's/\.git$//')"
export PATH=$PATH:/usr/local/bin/
git_sha1="$(git rev-parse HEAD)"
@@ -116,10 +121,13 @@ example: cp releng/jjb/opnfvdocs/build-docu.sh releng/jjb/<your-project>/::
#the double {{ in file_cut="${{file%.*}}" is to escape jjb's yaml
-**Create build-docu-verify.sh**::
+**docu-verify.sh**::
#!/bin/bash
- project="opnfvdocs"
+ set -e
+ set -o pipefail
+
+ project="$(git remote -v | head -n1 | awk '{{print $2}}' | sed -e 's,.*:\(.*/\)\?,,' -e 's/\.git$//')"
export PATH=$PATH:/usr/local/bin/
git_sha1="$(git rev-parse HEAD)"
@@ -158,7 +166,9 @@ example: cp releng/jjb/opnfvdocs/build-docu.sh releng/jjb/<your-project>/::
Make sure you have the job-templates set correctly as below.
-example: less releng/jjb/opnfvdocs/opnfvdocs.yml (pay extra attention at the "builder" sections)::
+example: less releng/jjb/opnfvdocs/opnfvdocs.yml (pay extra attention at the "builder" sections)
+
+**opnfvdocs.yml**::
- job-template:
name: 'opnfvdocs-daily-{stream}'
@@ -167,7 +177,7 @@ example: less releng/jjb/opnfvdocs/opnfvdocs.yml (pay extra attention at the "bu
...
builders:
- shell:
- !include-raw build-upload-docu.sh
+ !include-raw docu-build.sh
- job-template:
name: 'opnfvdocs-verify'
@@ -176,7 +186,7 @@ example: less releng/jjb/opnfvdocs/opnfvdocs.yml (pay extra attention at the "bu
...
builders:
- shell:
- !include-raw build-docu-verify.sh
+ !include-raw docu-verify.sh
- job-template:
name: 'opnfvdocs-merge'
@@ -185,8 +195,10 @@ example: less releng/jjb/opnfvdocs/opnfvdocs.yml (pay extra attention at the "bu
...
builders:
- shell:
- !include-raw build-upload-docu.sh
+ !include-raw docu-build.sh
+
+"node: master" is important here as all documentations are built on Jenkins master node for now.
Please reffer to the releng repository for the correct indentation as JJB is very picky with those and also for the rest of the code that is missing in the example code and replaced by "...".
Also you must have your documentation under docs/ in the repository or gsutil will fail to copy them; for customizations you might need to addapt build-docu.sh as we did for genesis project as different documents need to go into different places.
diff --git a/docs/other_options_for_docu_gen.rst b/docs/other_options_for_docu_gen.rst
index c687cb963..ea6ad2598 100644
--- a/docs/other_options_for_docu_gen.rst
+++ b/docs/other_options_for_docu_gen.rst
@@ -74,12 +74,3 @@ Revision: _sha1_
Build date: _date_
-**Test image inclusion for html**
-
-.. image:: images/smiley.png
- :height: 200
- :width: 200
- :alt: Just a smiley face!
- :align: left
-
-