Separate merge and verify script contents to avoid gs upload 91/391/3
authorVictor Laza <vlaza@cloudbasesolutions.com>
Mon, 20 Apr 2015 10:23:22 +0000 (13:23 +0300)
committerVictor Laza <vlaza@cloudbasesolutions.com>
Mon, 20 Apr 2015 10:48:04 +0000 (13:48 +0300)
JIRA: DOCS-22 - Separate merge and verify script contents to avoid gs upload
Needs to be done under releng jjb for all R1 projects

Change-Id: If9b4815e733a6b773f49f0dc3cd6da84618979fd
Signed-off-by: Victor Laza <vlaza@cloudbasesolutions.com>
12 files changed:
jjb/functest/build-docu-verify.sh [new file with mode: 0644]
jjb/functest/build-upload-docu.sh [moved from jjb/functest/build-docu.sh with 100% similarity]
jjb/functest/functest.yml
jjb/octopus/build-docu-verify.sh [new file with mode: 0644]
jjb/octopus/build-upload-docu.sh [moved from jjb/octopus/build-docu.sh with 100% similarity]
jjb/octopus/octopus.yml
jjb/opnfvdocs/build-docu-verify.sh [new file with mode: 0644]
jjb/opnfvdocs/build-upload-docu.sh [moved from jjb/opnfvdocs/build-docu.sh with 100% similarity]
jjb/opnfvdocs/opnfvdocs.yml
jjb/pharos/build-docu-verify.sh [new file with mode: 0644]
jjb/pharos/build-upload-docu.sh [moved from jjb/pharos/build-docu.sh with 100% similarity]
jjb/pharos/pharos.yml

diff --git a/jjb/functest/build-docu-verify.sh b/jjb/functest/build-docu-verify.sh
new file mode 100644 (file)
index 0000000..e8f34a7
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+project="functest"
+export PATH=$PATH:/usr/local/bin/
+
+git_sha1="$(git rev-parse HEAD)"
+docu_build_date="$(date)"
+
+files=()
+while read -r -d ''; do
+       files+=("$REPLY")
+done < <(find * -type f -iname '*.rst' -print0)
+
+for file in "${{files[@]}}"; do
+
+       file_cut="${{file%.*}}"
+       gs_cp_folder="${{file_cut}}"
+
+       # sed part
+       sed -i "s/_sha1_/$git_sha1/g" $file
+       sed -i "s/_date_/$docu_build_date/g" $file
+
+       # rst2html part
+       echo "rst2html $file"
+       rst2html $file > $file_cut".html"
+
+       echo "rst2pdf $file"
+       rst2pdf $file -o $file_cut".pdf"
+
+done
+
index 9c1ca08..8ef9269 100644 (file)
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-upload-docu.sh
 
     postbuilders:
         - test-macro
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-docu-verify.sh
 
 - job-template:
     name: 'functest-merge'
 
     builders:
         - shell: 
-            !include-raw build-docu.sh
+            !include-raw build-upload-docu.sh
 
diff --git a/jjb/octopus/build-docu-verify.sh b/jjb/octopus/build-docu-verify.sh
new file mode 100644 (file)
index 0000000..01338ef
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+project="octopus"
+export PATH=$PATH:/usr/local/bin/
+
+git_sha1="$(git rev-parse HEAD)"
+docu_build_date="$(date)"
+
+files=()
+while read -r -d ''; do
+       files+=("$REPLY")
+done < <(find * -type f -iname '*.rst' -print0)
+
+for file in "${{files[@]}}"; do
+
+       file_cut="${{file%.*}}"
+       gs_cp_folder="${{file_cut}}"
+
+       # sed part
+       sed -i "s/_sha1_/$git_sha1/g" $file
+       sed -i "s/_date_/$docu_build_date/g" $file
+
+       # rst2html part
+       echo "rst2html $file"
+       rst2html $file > $file_cut".html"
+
+       echo "rst2pdf $file"
+       rst2pdf $file -o $file_cut".pdf"
+
+done
+
index 923696e..c72292c 100644 (file)
@@ -74,7 +74,7 @@
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-upload-docu.sh
 
     postbuilders:
         - test-macro
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-docu-verify.sh
 
 - job-template:
     name: 'octopus-merge'
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-upload-docu.sh
 
diff --git a/jjb/opnfvdocs/build-docu-verify.sh b/jjb/opnfvdocs/build-docu-verify.sh
new file mode 100644 (file)
index 0000000..061e46d
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+project="opnfvdocs"
+export PATH=$PATH:/usr/local/bin/
+
+git_sha1="$(git rev-parse HEAD)"
+docu_build_date="$(date)"
+
+files=()
+while read -r -d ''; do
+       files+=("$REPLY")
+done < <(find * -type f -iname '*.rst' -print0)
+
+for file in "${{files[@]}}"; do
+
+       file_cut="${{file%.*}}"
+       gs_cp_folder="${{file_cut}}"
+
+       # sed part
+       sed -i "s/_sha1_/$git_sha1/g" $file
+       sed -i "s/_date_/$docu_build_date/g" $file
+
+       # rst2html part
+       echo "rst2html $file"
+       rst2html $file > $file_cut".html"
+
+       echo "rst2pdf $file"
+       rst2pdf $file -o $file_cut".pdf"
+
+done
+
index 5325327..2d39452 100644 (file)
@@ -49,7 +49,7 @@
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-upload-docu.sh
 
 - job-template:
     name: 'opnfvdocs-verify'
@@ -98,7 +98,7 @@
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-docu-verify.sh
 
 - job-template:
     name: 'opnfvdocs-merge'
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-upload-docu.sh
 
diff --git a/jjb/pharos/build-docu-verify.sh b/jjb/pharos/build-docu-verify.sh
new file mode 100644 (file)
index 0000000..46862d9
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+project="pharos"
+export PATH=$PATH:/usr/local/bin/
+
+git_sha1="$(git rev-parse HEAD)"
+docu_build_date="$(date)"
+
+files=()
+while read -r -d ''; do
+       files+=("$REPLY")
+done < <(find * -type f -iname '*.rst' -print0)
+
+for file in "${{files[@]}}"; do
+
+       file_cut="${{file%.*}}"
+       gs_cp_folder="${{file_cut}}"
+
+       # sed part
+       sed -i "s/_sha1_/$git_sha1/g" $file
+       sed -i "s/_date_/$docu_build_date/g" $file
+
+       # rst2html part
+       echo "rst2html $file"
+       rst2html $file > $file_cut".html"
+
+       echo "rst2pdf $file"
+       rst2pdf $file -o $file_cut".pdf"
+
+done
+
index 004ea8c..85f03b7 100644 (file)
@@ -70,7 +70,7 @@
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-upload-docu.sh
 
     postbuilders:
         - test-macro
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-docu-verify.sh
 
 - job-template:
     name: 'pharos-merge'
 
     builders:
         - shell:
-            !include-raw build-docu.sh
+            !include-raw build-upload-docu.sh