From f572ff82499a66113f1795ae57238ef0cbfb13fc Mon Sep 17 00:00:00 2001
From: Monty Taylor <mordred@inaugust.com>
Date: Thu, 16 Apr 2015 11:30:37 -0400
Subject: [PATCH] Publish infra docs to docs.o.o

The old ci.openstack.org server is not puppetted, and it's well past
time it was actually retired. Infra docs are one of the last things that
exist there that need to exist there. Move them.

Change-Id: I51a86699a39e6f8fdac91ad91f5933246681ae15
---
 jenkins/jobs/infra-publish-jobs.yaml |  1 -
 jenkins/jobs/infra.yaml              | 35 ---------------------------
 jenkins/jobs/projects.yaml           | 36 +++++++++++++++++-----------
 zuul/layout.yaml                     | 25 +++++--------------
 4 files changed, 28 insertions(+), 69 deletions(-)

diff --git a/jenkins/jobs/infra-publish-jobs.yaml b/jenkins/jobs/infra-publish-jobs.yaml
index 4471f7117f..cfa996c706 100644
--- a/jenkins/jobs/infra-publish-jobs.yaml
+++ b/jenkins/jobs/infra-publish-jobs.yaml
@@ -19,5 +19,4 @@
 - job-group:
     name: infra-publish-jobs
     jobs:
-        - 'gate-{name}-docs'
         - '{name}-infra-docs'
diff --git a/jenkins/jobs/infra.yaml b/jenkins/jobs/infra.yaml
index ac791beabb..abdd7ec68c 100644
--- a/jenkins/jobs/infra.yaml
+++ b/jenkins/jobs/infra.yaml
@@ -75,41 +75,6 @@
     publishers:
       - zuul-swift-upload-console-log
 
-# This is a non-standard docs job because it uses SCP instead of FTP
-- job-template:
-    name: '{name}-ci-docs'
-    node: 'bare-precise || bare-trusty'
-
-    builders:
-      - revoke-sudo
-      - gerrit-git-prep
-      - docs
-    publishers:
-      - scp:
-          # publish to ci.openstack.org
-          site: '173.203.107.207'
-          files:
-            - target: '{target}'
-              source: 'doc/build/html/**/*'
-              keep-hierarchy: true
-      - zuul-swift-upload-console-log
-      # TODO(jhesketh): Add job for uploading built docs
-
-- job:
-    name: gate-ci-docs
-    node: 'bare-precise || bare-trusty'
-
-    builders:
-      - revoke-sudo
-      - gerrit-git-prep
-      - docs
-
-    publishers:
-      - upload-sphinx-draft
-      - zuul-swift-upload-console-log
-      # TODO(jhesketh): Add job for uploading built docs
-
-
 - job:
     name: gate-project-config-projects-yaml
     node: 'bare-precise || bare-trusty'
diff --git a/jenkins/jobs/projects.yaml b/jenkins/jobs/projects.yaml
index 9b67a4ef7f..1677916cee 100755
--- a/jenkins/jobs/projects.yaml
+++ b/jenkins/jobs/projects.yaml
@@ -2265,6 +2265,7 @@
 
     jobs:
       - infra-publish-jobs
+      - 'gate-{name}-docs'
 
 - project:
     name: infra-specs
@@ -2296,23 +2297,25 @@
     name: jenkins-job-builder
     node: 'bare-precise || bare-trusty'
     tarball-site: tarballs.openstack.org
+    doc-publisher-site: docs.openstack.org
+    doc-publisher-folder: jenkins-job-builder
 
     jobs:
       - python-jobs
       - pypi-jobs
-      - '{name}-ci-docs':
-          target: 'ci/jenkins-job-builder'
+      - infra-publish-jobs
 
 - project:
     name: nodepool
     node: 'bare-precise || bare-trusty'
     tarball-site: tarballs.openstack.org
+    doc-publisher-site: docs.openstack.org
+    doc-publisher-folder: nodepool
 
     jobs:
       - python-jobs
       - pypi-jobs
-      - '{name}-ci-docs':
-          target: 'ci/nodepool'
+      - infra-publish-jobs
 
 - project:
     name: nose-html-output
@@ -2328,6 +2331,8 @@
     name: openstackid
     node: 'bare-precise || bare-trusty'
     tarball-site: tarballs.openstack.org
+    doc-publisher-site: docs.openstack.org
+    doc-publisher-folder: openstackid
 
     jobs:
       - gate-openstackid-unittests
@@ -2335,9 +2340,8 @@
           branch-designator: 'master'
       - 'openstackid-release-{branch-designator}':
           branch-designator: 'branch'
-      - gate-{name}-docs
-      - '{name}-ci-docs':
-          target: 'ci/openstackid'
+      - infra-publish-jobs
+      - 'gate-{name}-docs'
 
 
 - project:
@@ -2924,7 +2928,7 @@
     jobs:
       - python-jobs
       - pypi-jobs
-      - '{name}-infra-docs'
+      - infra-publish-jobs
       - '{pipeline}-shade-dsvm-functional{branch-designator}':
           pipeline: check
           node: 'devstack-precise || devstack-trusty'
@@ -2997,6 +3001,8 @@
 - project:
     name: system-config
     node: 'bare-precise || bare-trusty'
+    doc-publisher-site: docs.openstack.org
+    doc-publisher-folder: system-config
 
     jobs:
       - puppet-check-jobs
@@ -3008,19 +3014,20 @@
             - precise
             - trusty
             - centos6
-      - '{name}-ci-docs':
-          target: 'ci'
+      - infra-publish-jobs
+      - 'gate-{name}-docs'
 
 - project:
     name: vinz
     node: 'bare-precise || bare-trusty'
     tarball-site: tarballs.openstack.org
+    doc-publisher-site: docs.openstack.org
+    doc-publisher-folder: vinz
 
     jobs:
       - python-jobs
       - pypi-jobs
-      - '{name}-ci-docs':
-          target: 'ci/vinz'
+      - infra-publish-jobs
 
 - project:
     name: vinz-webclient
@@ -3062,12 +3069,13 @@
     name: zuul
     node: 'bare-precise || bare-trusty'
     tarball-site: tarballs.openstack.org
+    doc-publisher-site: docs.openstack.org
+    doc-publisher-folder: zuul
 
     jobs:
       - python-jobs
       - pypi-jobs
-      - '{name}-ci-docs':
-          target: 'ci/zuul'
+      - infra-publish-jobs
 
 ########################################################################
 # Section: Stackforge projects
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index eea40ce05d..7895aa7bb0 100755
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3893,11 +3893,11 @@ projects:
       - name: python-jobs
       - name: python3-jobs
       - name: publish-to-pypi
+      - name: infra-publish-jobs
     check:
       - jenkins-job-builder-compare-xml
       - jenkins-job-builder-coverage
     post:
-      - jenkins-job-builder-ci-docs
       - jenkins-job-builder-coverage
 
   - name: openstack-infra/lodgeit
@@ -3915,10 +3915,10 @@ projects:
       - name: merge-check
       - name: python-jobs
       - name: publish-to-pypi
+      - name: infra-publish-jobs
     check:
       - nodepool-coverage
     post:
-      - nodepool-ci-docs
       - nodepool-coverage
 
   - name: openstack-infra/nose-html-output
@@ -3937,6 +3937,7 @@ projects:
   - name: openstack-infra/openstackid
     template:
       - name: merge-check
+      - name: infra-publish-jobs
     check:
       - gate-openstackid-unittests
       - gate-openstackid-docs
@@ -3944,10 +3945,8 @@ projects:
       - gate-openstackid-unittests
     post:
       - openstackid-release-branch
-      - openstackid-ci-docs
     release:
       - openstackid-release-master
-      - openstackid-ci-docs
 
   - name: openstack-infra/openstackid-resources
     template:
@@ -4549,20 +4548,17 @@ projects:
     template:
       - name: merge-check
       - name: infra-puppet-apply-jobs
+      - name: infra-publish-jobs
     check:
       - gate-system-config-pep8
       - gate-system-config-bashate
       - gate-system-config-puppet-syntax
       - gate-system-config-nodepool
-      - gate-ci-docs
     gate:
       - gate-system-config-pep8
       - gate-system-config-bashate
       - gate-system-config-puppet-syntax
       - gate-system-config-nodepool
-      - gate-ci-docs
-    post:
-      - system-config-ci-docs
     experimental:
       - experimental-swift-logs-system-config-pep8-centos6
 
@@ -4577,12 +4573,7 @@ projects:
       - name: merge-check
       - name: publish-to-pypi
       - name: python-jobs
-    post:
-      - vinz-ci-docs
-    pre-release:
-      - vinz-ci-docs
-    release:
-      - vinz-ci-docs
+      - name: infra-publish-jobs
 
   - name: openstack-infra/vinz-webclient
     template:
@@ -4630,15 +4621,11 @@ projects:
       - name: publish-to-pypi
       - name: python26-jobs
       - name: python-jobs
+      - name: infra-publish-jobs
     check:
       - dev-zuul-coverage
     post:
-      - zuul-ci-docs
       - zuul-coverage
-    pre-release:
-      - zuul-ci-docs
-    release:
-      - zuul-ci-docs
     periodic:
       - periodic-test