-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Here's an alternative method you could use for mapping, making use of taskcluster APIs to avoid html scraping.
If the revision is ea104eeb14cc54da9a06c3766da63f73117723a0, you can make a GET to
https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.nightly.revision.ea104eeb14cc54da9a06c3766da63f73117723a0.firefox.win32-opt
The JSON returned contains a taskId of SVaH4iIoQVKK9-HWcE5OYQ, which lets you get the list of artifacts with a GET to
https://queue.taskcluster.net/v1/task/SVaH4iIoQVKK9-HWcE5OYQ/artifacts
And you can find firefox-\d+.0a1.en-US.win32.txt in the list, and request it with
https://queue.taskcluster.net/v1/task/SVaH4iIoQVKK9-HWcE5OYQ/artifacts/public/build/firefox-52.0a1.en-US.win32.txt
to read the buildID out. You do need a 40-character revision to make this work, but can covert using a GET like
https://hg.mozilla.org/mozilla-central/json-rev/ea104eeb14cc
and use the value of 'node' in the returned JSON.
If the buildid is 20161005030211, you can do a POST with empty data to
https://index.taskcluster.net/v1/namespaces/gecko.v2.mozilla-central.nightly.2016.10.05.revision
You'd get JSON back with a single revision for most days, but if it's >=2 you follow the same path as above for each revision, until you find the .txt file with the matching buildID.
You can play around with the taskcluster tools if I mangled any of that:
Artifact Browser - https://tools.taskcluster.net/index/artifacts/#gecko.v2.mozilla-central.nightly
Index Explorer - https://tools.taskcluster.net/index/#gecko.v2.mozilla-central/gecko.v2.mozilla-central
Task Inspector - https://tools.taskcluster.net/task-inspector/
It should be possible to generalize to Aurora too. Beta/Release/ESR are a bit different but bug 1289980 should help.