summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorVictor Laza <vlaza@cloudbasesolutions.com>2015-04-08 20:20:57 +0300
committerVictor Laza <vlaza@cloudbasesolutions.com>2015-04-08 20:20:57 +0300
commit6874ccaa77032c9530cf62c3056111c502135104 (patch)
tree1b7c249f46997bb4f37e950177837d9cc3b551b1 /jjb
parent41e14314400339743eef2c2ed4596c62c824306e (diff)
JIRA: DOCU-2 - Adding a job to build pharos documentation from .rst files
This job will use shell to build documentation for pharos project Change-Id: Ieb251514d555d891a9648e410974675fa894aae0 Signed-off-by: Victor Laza <vlaza@cloudbasesolutions.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/pharos/build-docu.sh8
-rw-r--r--jjb/pharos/pharos.yml43
2 files changed, 51 insertions, 0 deletions
diff --git a/jjb/pharos/build-docu.sh b/jjb/pharos/build-docu.sh
new file mode 100644
index 000000000..680686eb6
--- /dev/null
+++ b/jjb/pharos/build-docu.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+for file in $(find . -type f -iname '*.rst'); do
+ file_cut="${file%.*}"
+ html_file=$file_cut".html"
+ pdf_file=$file_cut".pdf"
+ rst2html $file > $html_file
+ rst2pdf $file -o $pdf_file
+done
diff --git a/jjb/pharos/pharos.yml b/jjb/pharos/pharos.yml
index fc2af7408..690b7f338 100644
--- a/jjb/pharos/pharos.yml
+++ b/jjb/pharos/pharos.yml
@@ -5,6 +5,7 @@
- 'pharos-daily-master'
- 'pharos-merge'
- 'pharos-verify'
+ - 'pharos-build-docs'
# stream: branch with - in place of / (eg. stable-helium)
# branch: branch (eg. stable/helium)
@@ -178,7 +179,49 @@
find .
echo "merge logic goes here"
+- job-template:
+ name: 'pharos-build-docs'
+
+ project-type: freestyle
+
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 40
+ artifactDaysToKeep: -1
+ artifactNumToKeep: 5
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: 'master'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ choosing-strategy: 'default'
+
+ wrappers:
+ - ssh-agent-credentials:
+ user: '{ssh-credentials}'
+
+ triggers:
+ - gerrit:
+ trigger-on:
+ - change-merged-event
+ - comment-added-contains-event:
+ comment-contains-value: 'remerge'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: 'pharos'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/master'
+ builders:
+ - shell: |
+ !include-raw build-docu.sh