JIRA: DOCS-6 - Add a build shell and a JJB for Octopus project 03/303/1
authorMatthewLi <matthew.lijun@huawei.com>
Tue, 14 Apr 2015 11:22:56 +0000 (19:22 +0800)
committerMatthewLi <matthew.lijun@huawei.com>
Tue, 14 Apr 2015 11:22:56 +0000 (19:22 +0800)
This job will be used to build documents

Change-Id: If4f1e2853b8bce48145a842488bed01ac9b93ab0
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
jjb/octopus/build-docu.sh [new file with mode: 0644]
jjb/octopus/octopus.yml

diff --git a/jjb/octopus/build-docu.sh b/jjb/octopus/build-docu.sh
new file mode 100644 (file)
index 0000000..cbbf265
--- /dev/null
@@ -0,0 +1,11 @@
+#!/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
+v
+v
+
index b0657de..40b25de 100644 (file)
             find .
             echo "merge logic goes here"
 
+- job-template:
+     name: 'octopus-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: 'octopus'
+                 branches:
+                     - branch-compare-type: 'ANT'
+                       branch-pattern: '**/master'
+
+     builders:
+         - shell:
+             !include-raw build-docu.sh
+
+