Bug 1048650 - TaskCluster task for Sphinx documentation generation; r?dustin draft
authorGregory Szorc <gps@mozilla.com>
Mon, 15 Aug 2016 22:33:34 -0700
changeset 401023 4772cd390ab898ecece8400492557c4373e1c536
parent 400825 054d4856cea6150a6638e5daf7913713281af97d
child 401038 cbd39f117725fb321d5c1fb73a5f77d59948a280
child 402664 a9e81f5341732c11a28d4c985086a77b897d7611
push id26338
push usergszorc@mozilla.com
push dateTue, 16 Aug 2016 05:33:48 +0000
reviewersdustin
bugs1048650
milestone51.0a1
Bug 1048650 - TaskCluster task for Sphinx documentation generation; r?dustin I've wanted to have automated test coverage of Sphinx documentation generation for years. Now that we can add new automation in-tree using TaskCluster, this is easy to implement. So do it. Probably the hackiest thing about this is the task reporting to the "lint" platform. We don't really have a more appropriate place to put this. MozReview-Commit-ID: 52ruTjtsGVH
taskcluster/ci/legacy/tasks/branches/base_jobs.yml
taskcluster/ci/legacy/tasks/tests/sphinx.yml
--- a/taskcluster/ci/legacy/tasks/branches/base_jobs.yml
+++ b/taskcluster/ci/legacy/tasks/branches/base_jobs.yml
@@ -305,16 +305,24 @@ tasks:
     task: tasks/tests/mozlint-wpt.yml
     root: true
     when:
       file_patterns:
         - 'testing/web-platform/tests/**'
         - 'python/mozlint/**'
         - 'tools/lint/**'
         - 'testing/docker/lint/**'
+  sphinx:
+    task: tasks/tests/sphinx.yml
+    root: true
+    when:
+      file_patterns:
+        - '**/*.py'
+        - '**/*.rst'
+        - 'tools/docs/**'
   taskgraph-tests:
     task: tasks/tests/taskgraph-tests.yml
     root: true
     when:
       file_patterns:
         - 'taskcluster/**/*.py'
         - 'config/mozunit.py'
         - 'python/mach/**/*.py'
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/legacy/tasks/tests/sphinx.yml
@@ -0,0 +1,53 @@
+---
+$inherits:
+  from: 'tasks/lint.yml'
+  variables:
+    build_product: 'lint'
+    build_name: 'sphinx'
+    build_type: 'opt'
+
+docker-image: lint
+task:
+  metadata:
+    name: '[TC] - Sphinx'
+    description: 'Sphinx in-tree docs'
+
+  payload:
+    image:
+      type: 'task-image'
+      path: 'public/image.tar'
+      taskId:
+        task-reference: '<docker-image>'
+
+    command:
+      - /home/worker/bin/run-task
+      - '--vcs-checkout=/home/worker/checkouts/gecko'
+      - '--'
+      - bash
+      - -cx
+      - >
+        cd /home/worker/checkouts/gecko &&
+        ./mach doc --outdir docs-out --no-open &&
+        rm -rf docs-out/html/Mozilla_Source_Tree_Docs/_venv &&
+        mv docs-out/html/Mozilla_Source_Tree_Docs docs &&
+        tar -czf docs.tar.gz docs
+
+    artifacts:
+      'public/docs.tar.gz':
+        type: file
+        path: '/home/worker/checkouts/gecko/docs.tar.gz'
+        expires:
+          relative-datestamp: '1 year'
+
+  extra:
+    locations:
+      build: null
+      tests: null
+    treeherder:
+      machine:
+        platform: lint
+      groupSymbol: tc
+      symbol: 'Doc'
+    treeherderEnv:
+      - production
+      - staging