Bug 1455570 - Build and publish TPS add-on; r=dustin,ted

MozReview-Commit-ID: HOsTcmg1m7e

--HG--
extra : rebase_source : 57ee75482fe1204d741f851ed51f32a06146ae08
This commit is contained in:
Dave Hunt 2018-04-23 14:32:05 +01:00
Родитель d4371a1b85
Коммит d5d4c1b840
6 изменённых файлов: 82 добавлений и 0 удалений

Просмотреть файл

@ -55,6 +55,7 @@ MACH_MODULES = [
'testing/mochitest/mach_commands.py',
'testing/mozharness/mach_commands.py',
'testing/raptor/mach_commands.py',
'testing/tps/mach_commands.py',
'testing/talos/mach_commands.py',
'testing/web-platform/mach_commands.py',
'testing/xpcshell/mach_commands.py',

Просмотреть файл

@ -0,0 +1,5 @@
%include build/sparse-profiles/mach
[include]
path:services/sync/tps/
path:testing/tps/

Просмотреть файл

@ -0,0 +1,39 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
loader: taskgraph.loader.transform:loader
transforms:
- taskgraph.transforms.job:transforms
- taskgraph.transforms.task:transforms
jobs:
tps-xpi:
description: Build the TPS add-on
index:
product: firefox
job-name: addons.tps
treeherder:
platform: linux64/opt
symbol: TPS(addon)
kind: build
tier: 1
run-on-projects: [mozilla-central]
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image: {in-tree: debian7-amd64-build}
max-run-time: 1800
artifacts:
- type: file
name: public/tps.xpi
path: /builds/worker/checkouts/gecko/tps-out/tps.xpi
run:
using: run-task
command: >
cd /builds/worker/checkouts/gecko &&
./mach tps-build --dest tps-out
sparse-profile: tps
when:
files-changed:
- 'services/sync/tps/extensions/tps/**'

Просмотреть файл

@ -62,6 +62,7 @@ treeherder:
'Rel': 'Release promotion'
'Snap': 'Snap image generation'
'langpack': 'Langpack sigatures and uploads'
'TPS': 'Sync tests'
index:
products:

Просмотреть файл

@ -462,3 +462,7 @@ diffoscope
Tasks used to compare pairs of Firefox builds using https://diffoscope.org/.
As of writing, this is mainly meant to be used in try builds, by editing
taskcluster/ci/diffoscope/kind.yml for your needs.
addon
-----
Tasks used to build/package add-ons.

Просмотреть файл

@ -0,0 +1,32 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, # You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, print_function
import os
from mach.decorators import Command, CommandArgument, CommandProvider
from mozbuild.base import MachCommandBase
from mozpack.copier import Jarrer
from mozpack.files import FileFinder
@CommandProvider
class MachCommands(MachCommandBase):
"""TPS tests for Sync."""
@Command('tps-build', category='testing', description='Build TPS add-on.')
@CommandArgument('--dest', default=None, help='Where to write add-on.')
def build(self, dest):
src = os.path.join(self.topsrcdir, 'services', 'sync', 'tps', 'extensions', 'tps')
dest = os.path.join(dest or os.path.join(self.topobjdir, 'services', 'sync'), 'tps.xpi')
if not os.path.exists(os.path.dirname(dest)):
os.makedirs(os.path.dirname(dest))
jarrer = Jarrer(optimize=False)
for p, f in FileFinder(src).find('*'):
jarrer.add(p, f)
jarrer.copy(dest)
print('Built TPS add-on as %s' % dest)