From 8a8377b79b6aa5b74a1afb813a8890fb4a3720b0 Mon Sep 17 00:00:00 2001
From: annegentle <anne@openstack.org>
Date: Sun, 17 Mar 2013 12:33:17 -0500
Subject: [PATCH] Adds build job for the new Operations Guide.

Adds gate job for the new Operations Guide.

Change-Id: I6ef1aaf0fdfbf3b43a054dd85d90dbed0d756d26
Reviewed-on: https://review.openstack.org/24599
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
---
 .../jenkins_job_builder/config/manuals.yaml   | 62 +++++++++++++++++++
 .../openstack_project/files/zuul/layout.yaml  |  3 +
 2 files changed, 65 insertions(+)

diff --git a/modules/openstack_project/files/jenkins_job_builder/config/manuals.yaml b/modules/openstack_project/files/jenkins_job_builder/config/manuals.yaml
index 16efa05414..7065cd17ae 100644
--- a/modules/openstack_project/files/jenkins_job_builder/config/manuals.yaml
+++ b/modules/openstack_project/files/jenkins_job_builder/config/manuals.yaml
@@ -27,6 +27,35 @@
               keep-hierarchy: true
               copy-after-failure: true
 
+- job:
+    name: gate-openstack-operations-guide
+    project-type: maven
+    node: quantal && !jclouds
+
+    triggers:
+      - zuul
+
+    prebuilders:
+      - gerrit-git-prep
+
+    maven:
+      maven-name: Maven3
+      root-module:
+        group-id: org.openstack.docs
+        artifact-id: openstack-guide
+      root-pom: doc/src/docbkx/openstack-ops/pom.xml
+      goals: 'clean generate-sources'
+
+    publishers:
+      - console-log
+      - scp:
+          site: 'static.openstack.org'
+          files:
+            - target: 'docs-draft/$JOB_NAME/$ZUUL_PIPELINE/$BUILD_NUMBER/ops/'
+              source: 'doc/src/docbkx/openstack-ops/target/docbkx/webhelp/**'
+              keep-hierarchy: true
+              copy-after-failure: true
+
 - job:
     name: gate-openstack-manuals-validate
     node: quantal
@@ -479,3 +508,36 @@
           remove-prefix: 'doc/src/docbkx/openstack-install/target/docbkx/webhelp/'
           excludes: '**/*.xml,**/null*'
 
+- job:
+    name: openstack-operations-guide
+    project-type: maven
+    concurrent: false
+    node: quantal && !jclouds
+
+    triggers:
+      - zuul-post
+
+    properties:
+      - inject:
+          script-file: /usr/local/jenkins/slave_scripts/docbook-properties.sh
+          properties-file: gerrit-doc.properties
+
+    prebuilders:
+      - gerrit-git-prep
+
+    maven:
+      maven-name: Maven3
+      root-module:
+        group-id: org.openstack.docs
+        artifact-id: openstack-guide
+      root-pom: doc/src/docbkx/openstack-ops/pom.xml
+      goals: '-Doperating.system=apt -Dprofile.os=ubuntu -Drelease.path.name=${DOC_RELEASE_PATH} -Dcomments.enabled=${DOC_COMMENTS_ENABLED} clean generate-sources'
+
+    publishers:
+      - console-log-post
+      - ftp:
+          site: docs.openstack.org
+          source: 'doc/src/docbkx/openstack-ops/target/docbkx/webhelp/**'
+          target: '/'
+          remove-prefix: 'doc/src/docbkx/openstack-ops/target/docbkx/webhelp/'
+          excludes: '**/*.xml,**/null*'
diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml
index b12db894c5..f252162321 100644
--- a/modules/openstack_project/files/zuul/layout.yaml
+++ b/modules/openstack_project/files/zuul/layout.yaml
@@ -1052,9 +1052,11 @@ projects:
   - name: openstack/openstack-manuals
     check:
       - gate-openstack-cli-guide
+      - gate-openstack-operations-guide
       - gate-openstack-manuals-validate
     gate:
       - gate-openstack-cli-guide
+      - gate-openstack-operations-guide
       - gate-openstack-manuals-validate
     post:
       - openstack-admin-manual-compute
@@ -1069,6 +1071,7 @@ projects:
       - openstack-ha-guide
       - openstack-install-deploy-guide-apt-fedora
       - openstack-install-deploy-guide-ubuntu
+      - openstack-operations-guide
 
   - name: openstack/api-site
     check: