From 62b3242ba6078949f366c7c883c0a283c3ede4f5 Mon Sep 17 00:00:00 2001
From: Doug Hellmann <doug.hellmann@dreamhost.com>
Date: Tue, 9 Jul 2013 12:56:21 -0400
Subject: [PATCH] Add gate job for CI docs

Add a separate gate job for ensuring that the CI
documentation can be built properly.

Change-Id: Ie12db6e0d7ac22f274d84a23527dc2861a59e0e6
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
---
 .../files/jenkins_job_builder/config/macros.yaml  | 11 +++++++++++
 .../config/openstack-ci-puppet.yaml               | 15 +++++++++++++++
 .../jenkins_job_builder/config/python-jobs.yaml   |  8 +-------
 modules/openstack_project/files/zuul/layout.yaml  |  1 +
 4 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml
index b41d3beaa0..fcd66ce5b9 100644
--- a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml
+++ b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml
@@ -330,3 +330,14 @@
               source: '**/*subunit_log.txt.gz'
               keep-hierarchy: false
               copy-after-failure: true
+
+- publisher:
+    name: upload-sphinx-draft
+    publishers:
+      - scp:
+          site: 'static.openstack.org'
+          files:
+            - target: 'docs-draft/$BASE_LOG_PATH/$JOB_NAME/$BUILD_NUMBER/'
+              source: 'doc/build/html/**'
+              keep-hierarchy: true
+              copy-after-failure: true
diff --git a/modules/openstack_project/files/jenkins_job_builder/config/openstack-ci-puppet.yaml b/modules/openstack_project/files/jenkins_job_builder/config/openstack-ci-puppet.yaml
index 7c3f5fd6f3..20bbdc0771 100644
--- a/modules/openstack_project/files/jenkins_job_builder/config/openstack-ci-puppet.yaml
+++ b/modules/openstack_project/files/jenkins_job_builder/config/openstack-ci-puppet.yaml
@@ -41,3 +41,18 @@
               source: 'doc/build/html/**/*'
               keep-hierarchy: true
       - console-log
+
+
+- job:
+    name: gate-ci-docs
+    node: precise
+
+    builders:
+      - gerrit-git-prep
+      - docs:
+          github-org: openstack-infra
+          project: config
+
+    publishers:
+      - console-log
+      - upload-sphinx-draft
diff --git a/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml
index cd76e5ccf4..ffc44f6e27 100644
--- a/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml
+++ b/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml
@@ -111,13 +111,7 @@
 
     publishers:
       - console-log
-      - scp:
-          site: 'static.openstack.org'
-          files:
-            - target: 'docs-draft/$BASE_LOG_PATH/$JOB_NAME/$BUILD_NUMBER/'
-              source: 'doc/build/html/**'
-              keep-hierarchy: true
-              copy-after-failure: true
+      - upload-sphinx-draft
 
     node: '{node}'
 
diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml
index 95c380d591..268d3904fd 100644
--- a/modules/openstack_project/files/zuul/layout.yaml
+++ b/modules/openstack_project/files/zuul/layout.yaml
@@ -319,6 +319,7 @@ projects:
       - gate-config-puppet-lint
       - gate-config-puppet-syntax
       - gate-config-pyflakes
+      - gate-ci-docs
     gate:
       - gate-config-layout
       - gate-config-puppet-lint