Move all doc verfication to docs-verify-rtd-* 45/46045/8
authoragardner <agardner@linuxfoundation.org>
Fri, 20 Oct 2017 17:29:47 +0000 (13:29 -0400)
committeragardner <agardner@linuxfoundation.org>
Wed, 1 Nov 2017 14:27:23 +0000 (10:27 -0400)
Ready for review (tested locally)

1) remove opnfvdocs-daily-{stream}:
We don't need a timed docs build. and it did not build anything usefull

2) remove opnfv-docs-verify-{stream}:
This uses depreciated and unmaintained opnfvdocs/scripts/docs-build.sh
It does not clone submodules and gives no usefull feedback
but it does post to artifacts and give a gerrit comment
move that functionality to docs-*-rtd-*

3) remove opnfv-docs-merge-{stream}:
does not upload anything meaningful

4) remove macro upload-generated-docs-to-opnfv-artifacts:
is no longer needed since we use read the docs

5) improve docs-verify-rtd-{stream}:
generate single page html and post to artifacts
send gerrit commment with location of single page html,
errors (like malformed table) are embedded nicely in the single
page output and give devs a single source of feedback on their work

6) improve docs-merge-rtd-{stream}:
this job now needs to remove review documenation created by
docs-verify-rtd-{stream}

TODO, after this is merged:
remove now unused opnfvdocs/scripts/docs-build.sh

Change-Id: I802eb11712d42555d34f986d061bf0dfc623c1e9
Signed-off-by: agardner <agardner@linuxfoundation.org>
jjb/global/releng-macros.yml
jjb/opnfvdocs/docs-rtd.yaml
jjb/opnfvdocs/opnfvdocs.yml
jjb/releng/opnfv-docs.yml [deleted file]

index 59415f5..deac208 100644 (file)
              #!/bin/bash
              sudo chown -R $USER:$USER $WORKSPACE || exit 1
 
-- builder:
-    name: build-html-and-pdf-docs-output
-    builders:
-      - shell: |
-          #!/bin/bash
-          set -o errexit
-          set -o xtrace
-          export PATH=$PATH:/usr/local/bin/
-          git clone ssh://gerrit.opnfv.org:29418/opnfvdocs docs_build/_opnfvdocs
-          GERRIT_COMMENT=gerrit_comment.txt ./docs_build/_opnfvdocs/scripts/docs-build.sh
-
 - builder:
     name: upload-under-review-docs-to-opnfv-artifacts
     builders:
           local_path="upload/$GERRIT_CHANGE_NUMBER"
 
           mkdir -p upload
-          mv docs_output "$local_path"
+          mv docs/_build/html/ "$local_path"
           gsutil -m cp -r "$local_path" "gs://$gs_base"
 
           gsutil -m setmeta \
           find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
               sed -e "s|^$local_path|    http://$gs_path|" >> gerrit_comment.txt
 
-- builder:
-    name: upload-generated-docs-to-opnfv-artifacts
-    builders:
-      - shell: |
-          #!/bin/bash
-          set -o errexit
-          set -o pipefail
-          set -o xtrace
-          export PATH=$PATH:/usr/local/bin/
-
-          [[ -d docs_output ]] || exit 0
-
-          echo
-          echo "########################"
-          echo "UPLOADING GENERATED DOCS"
-          echo "########################"
-          echo
-
-          echo "gs_path="$GS_URL/docs""
-          echo "local_path="upload/docs""
-
-          gs_path="$GS_URL/docs"
-          local_path="upload/docs"
-
-          mkdir -p upload
-          mv docs_output "$local_path"
-          ls "$local_path"
-
-          echo "gsutil -m cp -r "$local_path"/* "gs://$gs_path""
-          gsutil -m cp -r "$local_path"/* "gs://$gs_path"
-
-          gsutil -m setmeta \
-              -h "Content-Type:text/html" \
-              -h "Cache-Control:private, max-age=0, no-transform" \
-              "gs://$gs_path"/**.html > /dev/null 2>&1
-
-          echo "Document link(s):" >> gerrit_comment.txt
-          find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
-              sed -e "s|^$local_path|    http://$gs_path|" >> gerrit_comment.txt
-
 # To take advantage of this macro, have your build write
 # out the file 'gerrit_comment.txt' with information to post
 # back to gerrit and include this macro in the list of builders.
 - builder:
     name: upload-review-docs
     builders:
-      - build-html-and-pdf-docs-output
       - upload-under-review-docs-to-opnfv-artifacts
       - report-build-result-to-gerrit
 
-- builder:
-    name: upload-merged-docs
-    builders:
-      - build-html-and-pdf-docs-output
-      - upload-generated-docs-to-opnfv-artifacts
-      - report-build-result-to-gerrit
-      - remove-old-docs-from-opnfv-artifacts
-
 - builder:
     name: check-bash-syntax
     builders:
index c989595..a8b9bef 100644 (file)
@@ -36,6 +36,7 @@
           files: 'docs/**/*.*'
 
     builders:
+      - 'remove-old-docs-from-opnfv-artifacts'
       - shell: |
           if [ $GERRIT_BRANCH == "master" ]; then
             RTD_BUILD_VERSION=latest
@@ -89,4 +90,6 @@
           pip install --upgrade pip
           pip freeze
           pip install tox
+          sed -i s,\-b\ html,\-b\ singlehtml,g tox.ini
           tox -edocs
+      - 'upload-review-docs'
index 95bc8a9..3dfb9d1 100644 (file)
@@ -11,7 +11,6 @@
     jobs:
       - 'opnfvdocs-verify-shellcheck-{stream}'
       - 'opnfvdocs-merge-shellcheck-{stream}'
-      - 'opnfvdocs-daily-{stream}'
 
     stream:
       - master:
 
     builders:
       - check-bash-syntax
-
-- job-template:
-    name: 'opnfvdocs-daily-{stream}'
-
-    disabled: true
-
-    parameters:
-      - project-parameter:
-          project: '{project}'
-          branch: '{branch}'
-      - string:
-          name: GS_URL
-          default: '$GS_BASE{gs-pathname}'
-          description: "Directory where the build artifact will be located upon the completion of the build."
-      - string:
-          name: GIT_CLONE_BASE
-          default: ssh://gerrit.opnfv.org:29418
-          description: "Used for overriding the GIT URL coming from parameters macro."
-
-    scm:
-      - git-scm
-
-    triggers:
-      - timed: '0 H/6 * * *'
-
-    builders:
-      - build-html-and-pdf-docs-output
-#     - upload-generated-docs-to-opnfv-artifacts
diff --git a/jjb/releng/opnfv-docs.yml b/jjb/releng/opnfv-docs.yml
deleted file mode 100644 (file)
index 7402745..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
----
-########################
-# Job configuration for opnfv-docs
-########################
-- project:
-
-    name: opnfv-docs
-
-    project: opnfv-docs
-
-    jobs:
-      - 'opnfv-docs-verify-{stream}'
-      - 'opnfv-docs-merge-{stream}'
-
-    stream:
-      - master:
-          branch: '{stream}'
-          doc-version: ''
-          gs-pathname: ''
-          disabled: false
-      - euphrates:
-          branch: 'stable/{stream}'
-          doc-version: '5.0.0'
-          gs-pathname: '/{stream}/{doc-version}'
-          disabled: false
-
-########################
-# job templates
-########################
-
-- job-template:
-    name: 'opnfv-docs-verify-{stream}'
-
-    disabled: '{obj:disabled}'
-
-    parameters:
-      - project-parameter:
-          project: $GERRIT_PROJECT
-          branch: '{branch}'
-
-    scm:
-      - git-scm-gerrit
-
-    triggers:
-      - gerrit:
-          server-name: 'gerrit.opnfv.org'
-          trigger-on:
-            - patchset-created-event:
-                exclude-drafts: 'false'
-                exclude-trivial-rebase: 'false'
-                exclude-no-code-change: 'false'
-            - draft-published-event
-            - comment-added-contains-event:
-                comment-contains-value: 'recheck'
-            - comment-added-contains-event:
-                comment-contains-value: 'reverify'
-          projects:
-            - project-compare-type: 'ANT'
-              project-pattern: '*'
-              branches:
-                - branch-compare-type: 'ANT'
-                  branch-pattern: '**/{branch}'
-              file-paths:
-                - compare-type: ANT
-                  pattern: docs/**
-                - compare-type: ANT
-                  pattern: yardstick/**
-
-    builders:
-      - upload-review-docs
-
-- job-template:
-    name: 'opnfv-docs-merge-{stream}'
-
-    disabled: '{obj:disabled}'
-
-    parameters:
-      - project-parameter:
-          project: $GERRIT_PROJECT
-          branch: '{branch}'
-      - string:
-          name: GS_URL
-          default: '$GS_BASE{gs-pathname}'
-          description: "Directory where the build artifact will be located upon the completion of the build."
-      - string:
-          name: GERRIT_REFSPEC
-          default: 'refs/heads/{branch}'
-          description: "JJB configured GERRIT_REFSPEC parameter"
-
-    scm:
-      - git-scm
-
-    triggers:
-      - gerrit:
-          server-name: 'gerrit.opnfv.org'
-          trigger-on:
-            - change-merged-event
-            - comment-added-contains-event:
-                comment-contains-value: 'remerge'
-            - comment-added-contains-event:
-                comment-contains-value: 'rebuild docs'
-          projects:
-            - project-compare-type: 'ANT'
-              project-pattern: '*'
-              branches:
-                - branch-compare-type: 'ANT'
-                  branch-pattern: '**/{branch}'
-              file-paths:
-                - compare-type: ANT
-                  pattern: docs/**
-                - compare-type: ANT
-                  pattern: yardstick/**
-
-    builders:
-      - upload-merged-docs