From bb7c165184b57188fa8cd1075b246e9cd5d7dca8 Mon Sep 17 00:00:00 2001
From: Andreas Jaeger <aj@suse.com>
Date: Mon, 10 Oct 2016 16:40:32 +0200
Subject: [PATCH] Build and publish murano firstapp document

Build and publish murano firstapp document to developer.openstack.org.

Change-Id: I0f8bcea803b01e2e238b1ebc26afb0cebf8180bc
---
 jenkins/jobs/api-jobs.yaml | 29 +++++++++++++++++++++++++++++
 jenkins/jobs/projects.yaml |  4 ++++
 zuul/layout.yaml           | 16 ++++++++++++++++
 3 files changed, 49 insertions(+)

diff --git a/jenkins/jobs/api-jobs.yaml b/jenkins/jobs/api-jobs.yaml
index 3dc8d90c9a..16cd29ab75 100644
--- a/jenkins/jobs/api-jobs.yaml
+++ b/jenkins/jobs/api-jobs.yaml
@@ -211,3 +211,32 @@
           remove-prefix: 'doc/build/html/'
       - test-results
       - console-log
+
+- job:
+    name: murano-firstapp-docs
+    description: Build and publish the Murano Firstapp docs from source.
+    node: ubuntu-xenial
+
+    builders:
+      - gerrit-git-prep
+      - install-distro-packages
+      - revoke-sudo
+      - tox:
+          envlist: 'murano-firstapp'
+      - add-docs-root-marker:
+          docsrootdir: doc/build/murano-firstapp/html
+
+    publishers:
+      - ftp:
+          site: developer.openstack.org
+          source: 'doc/build/murano-firstapp/html/**'
+          target: 'murano-firstapp'
+          remove-prefix: 'doc/build/murano-firstapp/html/'
+          excludes: ''
+      - afs:
+          site: afs-developer-docs
+          source: 'doc/build/murano-firstapp/html/**'
+          target: 'murano-firstapp'
+          remove-prefix: 'doc/build/murano-firstapp/html/'
+      - test-results
+      - console-log
diff --git a/jenkins/jobs/projects.yaml b/jenkins/jobs/projects.yaml
index 47b5f1d7ea..acc037692f 100644
--- a/jenkins/jobs/projects.yaml
+++ b/jenkins/jobs/projects.yaml
@@ -6866,6 +6866,10 @@
           envlist: py27-mitaka
           node:
             - ubuntu-xenial
+      - 'gate-{name}-tox-{envlist}-{node}':
+          envlist: murano-firstapp
+          node:
+            - ubuntu-xenial
       - gate-{name}-pylint
       - pypi-jobs
       - openstack-publish-jobs
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 22973f4f0e..a09533c8d2 100755
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2492,6 +2492,19 @@ jobs:
   - name: ^(?!gate-).*-install-guide$
     branch: ^(?!stable/(liberty|mitaka)).*$
 
+
+  - name: murano-firstapp-docs
+    # Only publish from master
+    branch: master
+    success-pattern: http://docs-draft.openstack.org/{build.parameters[LOG_PATH]}/doc/build/murano-firstapp/html/
+    # This is only build and publised from master
+    branch: master
+    files:
+      - '^tox.ini$'
+      - '^doc/murano-firstapp/.*'
+      - bindep.txt
+      - '^.*requirements.txt$'
+
   - name: ^gate-.*-js-draft
     success-pattern: http://docs-draft.openstack.org/{build.parameters[LOG_PATH]}/dist/
 
@@ -11165,12 +11178,15 @@ projects:
       - gate-tempest-dsvm-murano-api
       - gate-tempest-dsvm-murano-cfapi
       - gate-tempest-dsvm-murano-glare-backend
+      - gate-murano-tox-murano-firstapp-ubuntu-xenial
     gate:
       - gate-tempest-dsvm-murano-api
       - gate-murano-devstack-dsvm
+      - gate-murano-tox-murano-firstapp-ubuntu-xenial
     post:
       - murano-coverage-db-ubuntu-trusty
       - murano-coverage-db-ubuntu-xenial
+      - murano-firstapp-docs
 
   - name: openstack/murano-agent
     template: