Bug 1410969 - TaskCluster task for generating JSON files with Bugzilla metadata; r?ahal
We now have a "source" task that produces JSON files with per-file
Bugzilla components and a list of files missing a declared Bugzilla
component. gzip variations are also produced.
The files are published in the index so clients can query e.g.
gecko.v2.mozilla-central.latest.source.source-bugzilla-info/public/components.json
and get the latest metadata. This should help alleviate the need for
querying the moz.build evaluation API on hg.mozilla.org - or at least
facilitate bulk queries of the data from a static source.
MozReview-Commit-ID: 9fAoPSt4bxq
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/source-test/file-metadata.yml
@@ -0,0 +1,33 @@
+job-defaults:
+ platform: lint/opt
+ treeherder:
+ kind: test
+ tier: 1
+ worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
+ worker:
+ docker-image: {in-tree: "lint"}
+ max-run-time: 1800
+
+bugzilla-components:
+ description: Generate metadata about source files and Bugzilla
+ treeherder:
+ symbol: Bugzilla
+ index:
+ product: source
+ job-name: source-bugzilla-info
+ run:
+ using: run-task
+ command: >
+ mkdir -p /builds/worker/artifacts
+ && cd /builds/worker/checkouts/gecko
+ && ./mach file-info bugzilla-component --format json '**' > /builds/worker/artifacts/components.json
+ && ./mach file-info missing-bugzilla --format json '**' | tee /builds/worker/artifacts/missing.json
+ && gzip --keep /builds/worker/artifacts/*.json
+ worker:
+ artifacts:
+ - type: directory
+ path: /builds/worker/artifacts
+ name: public
+ when:
+ files-changed:
+ - '**'
--- a/taskcluster/ci/source-test/kind.yml
+++ b/taskcluster/ci/source-test/kind.yml
@@ -8,16 +8,17 @@ transforms:
- taskgraph.transforms.try_job:transforms
- taskgraph.transforms.source_test:transforms
- taskgraph.transforms.job:transforms
- taskgraph.transforms.task:transforms
jobs-from:
- cram.yml
- doc.yml
+ - file-metadata.yml
- mocha.yml
- mozlint.yml
- python.yml
- webidl.yml
# This is used by run-task based tasks to lookup which build task it
# should depend on based on its own platform.
dependent-build-platforms:
--- a/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
+++ b/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
@@ -90,16 +90,17 @@ JOB_NAME_WHITELIST = set([
'sm-package-opt',
'sm-plain-opt',
'sm-win-plain-opt',
'sm-plaindebug-debug',
'sm-win-plaindebug-debug',
'sm-rootanalysis-debug',
'sm-rust-bindings-debug',
'sm-tsan-opt',
+ 'source-bugzilla-info',
'win32-add-on-devel',
'win32-clang-tidy',
'win32-debug',
'win32-devedition-nightly-repackage',
'win32-devedition-nightly-repackage-signing',
'win32-devedition-opt',
'win32-nightly-repackage',
'win32-nightly-repackage-signing',
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -108,17 +108,23 @@ task_description_schema = Schema({
# treeherder environments (defaults to both staging and production)
Required('environments', default=['production', 'staging']): ['production', 'staging'],
},
# information for indexing this build so its artifacts can be discovered;
# if omitted, the build will not be indexed.
Optional('index'): {
# the name of the product this build produces
- 'product': Any('firefox', 'mobile', 'static-analysis', 'devedition'),
+ 'product': Any(
+ 'firefox',
+ 'mobile',
+ 'static-analysis',
+ 'devedition',
+ 'source',
+ ),
# the names to use for this job in the TaskCluster index
'job-name': basestring,
# Type of gecko v2 index to use
'type': Any('generic', 'nightly', 'l10n', 'nightly-with-multi-l10n'),
# The rank that the task will receive in the TaskCluster