Bug 1293789 - Single Locale in TC - Add task def for try. r=rail draft
authorJustin Wood <Callek@gmail.com>
Sat, 03 Sep 2016 10:32:22 -0400
changeset 410242 4a575d04ea6fac7078d483f00f169cfdb9ac5194
parent 410241 cd223902bb8fcd4f0d4d926ad5d17dbf69d760f2
child 410246 4438dfae1969b6e8b22cc54e9c7ddec501cf791e
push id28690
push userCallek@gmail.com
push dateTue, 06 Sep 2016 12:49:11 +0000
reviewersrail
bugs1293789
milestone51.0a1
Bug 1293789 - Single Locale in TC - Add task def for try. r=rail MozReview-Commit-ID: 7n2NqqHj9wL
taskcluster/ci/legacy/tasks/branches/base_job_flags.yml
taskcluster/ci/legacy/tasks/branches/base_jobs.yml
taskcluster/ci/legacy/tasks/branches/try/job_flags.yml
taskcluster/ci/legacy/tasks/builds/android_l10n_api_15.yml
taskcluster/ci/legacy/tasks/builds/android_l10n_base.yml
taskcluster/taskgraph/test/test_try_option_syntax.py
taskcluster/taskgraph/try_option_syntax.py
testing/mozharness/configs/single_locale/tc_android-api-15.py
testing/mozharness/configs/single_locale/tc_android_api_15.py
testing/mozharness/configs/single_locale/try_android-api-15.py
--- a/taskcluster/ci/legacy/tasks/branches/base_job_flags.yml
+++ b/taskcluster/ci/legacy/tasks/branches/base_job_flags.yml
@@ -9,16 +9,17 @@ flags:
     - linux64-haz    # Firefox desktop browser, rooting hazard analysis
     - linux64-shell-haz  # JS shell, rooting hazard analysis
     - linux64-mulet-haz  # Firefox desktop - b2g gecko linux 64 bit, rooting hazard analysis
     - macosx64_gecko # b2g desktop osx 64 bit
     - win32_gecko    # b2g desktop win 32 bit
     - nexus-5l-eng
     - aries-eng
     - android-api-15
+    - android-api-15-l10n
     - android-api-15-gradle
     - android-api-15-frontend
     - android-partner-sample1
     - android-x86
     - linux
     - linux-l10n    # Desktop l10n
     - linux64
     - linux64-l10n  # Desktop l10n
--- a/taskcluster/ci/legacy/tasks/branches/base_jobs.yml
+++ b/taskcluster/ci/legacy/tasks/branches/base_jobs.yml
@@ -4,16 +4,18 @@
 
 $inherits:
   from: tasks/branches/base_job_flags.yml
 
 builds:
   android-api-15:
     platforms:
       - Android
+    extra-builds:  # see RIDEALONG_BUILDS in `mach taskgraph`
+      - android-api-15-l10n
     types:
       opt:
         task: tasks/builds/android_api_15.yml
       debug:
         task: tasks/builds/android_api_15_debug.yml
   android-x86:
     platforms:
       - Android
--- a/taskcluster/ci/legacy/tasks/branches/try/job_flags.yml
+++ b/taskcluster/ci/legacy/tasks/branches/try/job_flags.yml
@@ -116,16 +116,31 @@ builds:
       debug:
         task: tasks/builds/dbg_linux64_asan.yml
   macosx64-st-an:
     platforms:
       - MacOSX64 Static Analysis
     types:
       opt:
         task: tasks/builds/opt_macosx64_st-an.yml
+  android-api-15-l10n:
+    platforms:
+      - Android
+    types:
+      opt:
+        task: tasks/builds/android_l10n_api_15.yml
+    when:
+      file_patterns:
+        - mobile/android/locales/all-locales
+        - python/compare-locales/**
+        - testing/mozharness/configs/single_locale/**
+        - testing/mozharness/mozharness/mozilla/l10n/locales.py
+        - testing/mozharness/scripts/desktop_l10n.py
+        - toolkit/locales/**
+        - toolkit/mozapps/installer/**
   aries-eng:
     platforms:
       - b2g
     types:
       opt:
         task: tasks/builds/b2g_aries_eng.yml
       debug:
         task: tasks/builds/b2g_aries_debug.yml
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/legacy/tasks/builds/android_l10n_api_15.yml
@@ -0,0 +1,19 @@
+$inherits:
+  from: 'tasks/builds/android_l10n_base.yml'
+  variables:
+    build_name: 'android-l10n'
+    platform: 'android-api-15'
+task:
+  metadata:
+      name: '[TC] Android API 15 Single Locale Repack'
+      description: 'Android API 15 Single Locale Repack'
+
+  workerType: 'android-api-15'
+
+  extra:
+    treeherder:
+      groupSymbol: tc
+      groupName: Submitted by taskcluster
+      tier: 2
+      symbol: L10n
+
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/legacy/tasks/builds/android_l10n_base.yml
@@ -0,0 +1,52 @@
+$inherits:
+  from: 'tasks/l10n.yml'
+  variables:
+    platform: 'android-api-15'
+    build_name: 'android-l10n'
+    build_product: 'mobile'
+    build_type: 'opt'
+docker-image: desktop-build
+task:
+  scopes:
+    - 'docker-worker:cache:tooltool-cache'
+    - 'docker-worker:relengapi-proxy:tooltool.download.public'
+    - 'docker-worker:relengapi-proxy:tooltool.download.internal'
+    - 'docker-worker:cache:level-{{level}}-{{project}}-l10n-{{build_name}}-workspace'
+
+  payload:
+    image:
+      type: 'task-image'
+      path: 'public/image.tar'
+      taskId:
+        task-reference: "<docker-image>"
+    cache:
+      tooltool-cache: '/home/worker/tooltool-cache'
+      level-{{level}}-{{project}}-l10n-{{build_name}}-workspace: '/home/worker/workspace'
+
+    features:
+      relengAPIProxy: true
+
+    env:
+      MOZHARNESS_SCRIPT: 'mozharness/scripts/mobile_l10n.py'
+      MOZHARNESS_CONFIG: 'single_locale/{{project}}_{{platform}}.py single_locale/tc_{{platform}}.py'
+      MOZHARNESS_ACTIONS: 'clone-locales list-locales setup repack upload-repacks summary'
+      MOZHARNESS_OPTIONS: 'total-chunks=1 this-chunk=1'
+      JOB_SCRIPT: 'taskcluster/scripts/builder/build-l10n.sh'
+      MH_BRANCH: {{project}}
+      MH_BUILD_POOL: taskcluster
+      # image paths
+      TOOLTOOL_CACHE: '/home/worker/tooltool-cache'
+      NEED_XVFB: true
+
+    maxRunTime: 18000
+
+    command: ["/bin/bash", "bin/build.sh"]
+
+  extra:
+    treeherderEnv:
+      - production
+      - staging
+    treeherder:
+      machine:
+        # see https://github.com/mozilla/treeherder/blob/master/ui/js/values.js
+        platform: {{platform}}
--- a/taskcluster/taskgraph/test/test_try_option_syntax.py
+++ b/taskcluster/taskgraph/test/test_try_option_syntax.py
@@ -132,17 +132,21 @@ class TestTryOptionSyntax(unittest.TestC
     def test_p_linux_win32(self):
         "-p linux,win32 sets platforms=['linux', 'linux-l10n', 'win32']"
         tos = TryOptionSyntax('try: -p linux,win32', empty_graph)
         self.assertEqual(sorted(tos.platforms), ['linux', 'linux-l10n', 'win32'])
 
     def test_p_expands_ridealongs(self):
         "-p linux,linux64 includes the RIDEALONG_BUILDS"
         tos = TryOptionSyntax('try: -p linux,linux64', empty_graph)
-        ridealongs = list(itertools.chain.from_iterable(RIDEALONG_BUILDS.itervalues()))
+        ridealongs = list(task
+                          for task in itertools.chain.from_iterable(
+                                RIDEALONG_BUILDS.itervalues()
+                          )
+                          if 'android' not in task)  # Don't include android-l10n
         self.assertEqual(sorted(tos.platforms), sorted(['linux', 'linux64'] + ridealongs))
 
     def test_u_none(self):
         "-u none sets unittests=[]"
         tos = TryOptionSyntax('try: -u none', graph_with_jobs)
         self.assertEqual(sorted(tos.unittests), [])
 
     def test_u_all(self):
--- a/taskcluster/taskgraph/try_option_syntax.py
+++ b/taskcluster/taskgraph/try_option_syntax.py
@@ -121,16 +121,19 @@ UNITTEST_PLATFORM_PRETTY_NAMES = {
     # 'win32': [..TODO..],
     # 'win64': [..TODO..],
 }
 
 # We have a few platforms for which we want to do some "extra" builds, or at
 # least build-ish things.  Sort of.  Anyway, these other things are implemented
 # as different "platforms".
 RIDEALONG_BUILDS = {
+    'android-api-15': [
+        'android-api-15-l10n',
+    ],
     'linux': [
         'linux-l10n',
     ],
     'linux64': [
         'linux64-l10n',
         'sm-plain',
         'sm-nonunified',
         'sm-arm-sim',
rename from testing/mozharness/configs/single_locale/tc_android_api_15.py
rename to testing/mozharness/configs/single_locale/tc_android-api-15.py
--- a/testing/mozharness/configs/single_locale/tc_android_api_15.py
+++ b/testing/mozharness/configs/single_locale/tc_android-api-15.py
@@ -3,28 +3,16 @@ import os
 config = {
     "locales_file": "src/mobile/android/locales/all-locales",
     "tools_repo": "https://hg.mozilla.org/build/tools",
     "mozconfig": "src/mobile/android/config/mozconfigs/android-api-15/l10n-nightly",
     "tooltool_config": {
         "manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
         "output_dir": "%(abs_work_dir)s/src",
     },
-    #"tooltool_servers": ['http://relengapi/tooltool/'],
+    "tooltool_servers": ['http://relengapi/tooltool/'],
 
-    #"bootstrap_env": {
-    #    "NO_MERCURIAL_SETUP_CHECK": "1",
-    #    "MOZ_OBJDIR": "obj-l10n",
-    #    "EN_US_BINARY_URL": "%(en_us_binary_url)s",
-    #    "LOCALE_MERGEDIR": "%(abs_merge_dir)s/",
-    #    "MOZ_UPDATE_CHANNEL": "%(update_channel)s",
-    #    "DIST": "%(abs_objdir)s",
-    #    "LOCALE_MERGEDIR": "%(abs_merge_dir)s/",
-    #    "L10NBASEDIR": "../../l10n",
-    #    "MOZ_MAKE_COMPLETE_MAR": "1",
-    #    'TOOLTOOL_CACHE': os.environ.get('TOOLTOOL_CACHE'),
-    #},
     "upload_env": {
         'UPLOAD_HOST': 'localhost',
         'UPLOAD_PATH': '/home/worker/artifacts/',
     },
     "mozilla_dir": "src/",
 }
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/single_locale/try_android-api-15.py
@@ -0,0 +1,97 @@
+BRANCH = "try"
+MOZILLA_DIR = BRANCH
+EN_US_BINARY_URL = "http://archive.mozilla.org/pub/" \
+                   "mobile/nightly/latest-mozilla-central-android-api-15/en-US"
+
+config = {
+    "branch": "try",
+    "log_name": "single_locale",
+    "objdir": "obj-l10n",
+    "is_automation": True,
+    "buildbot_json_path": "buildprops.json",
+    "force_clobber": True,
+    "clobberer_url": "https://api.pub.build.mozilla.org/clobberer/lastclobber",
+    "locales_file": "%s/mobile/android/locales/all-locales" % MOZILLA_DIR,
+    "locales_dir": "mobile/android/locales",
+    "ignore_locales": ["en-US"],
+    "nightly_build": False,
+    'balrog_credentials_file': 'oauth.txt',
+    "tools_repo": "https://hg.mozilla.org/build/tools",
+    "tooltool_config": {
+        "manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
+        "output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
+    },
+    "exes": {
+        'tooltool.py': '/builds/tooltool.py',
+    },
+    "update_gecko_source_to_enUS": False,
+    "repos": [{
+        "vcs": "hg",
+        "repo": "https://hg.mozilla.org/build/tools",
+        "branch": "default",
+        "dest": "tools",
+    }, {
+        "vcs": "hg",
+        "repo": "https://hg.mozilla.org/try",
+        "revision": "%(revision)s",
+        "dest": "try",
+        "clone_upstream_url": "https://hg.mozilla.org/mozilla-central",
+        "clone_by_revision": True,
+        "clone_with_purge": True,
+    }],
+    "hg_l10n_base": "https://hg.mozilla.org/l10n-central",
+    "hg_l10n_tag": "default",
+    'vcs_share_base': "/builds/hg-shared",
+
+    "l10n_dir": "l10n-central",
+    "repack_env": {
+        # so ugly, bug 951238
+        "LD_LIBRARY_PATH": "/lib:/tools/gcc-4.7.2-0moz1/lib:/tools/gcc-4.7.2-0moz1/lib64",
+        "MOZ_OBJDIR": "obj-l10n",
+        "EN_US_BINARY_URL": EN_US_BINARY_URL,
+        "LOCALE_MERGEDIR": "%(abs_merge_dir)s/",
+        "MOZ_UPDATE_CHANNEL": "try", # XXX Invalid
+    },
+    "upload_branch": "%s-android-api-15" % BRANCH,
+    "ssh_key_dir": "~/.ssh",
+    "merge_locales": True,
+    "mozilla_dir": MOZILLA_DIR,
+    "mozconfig": "%s/mobile/android/config/mozconfigs/android-api-15/l10n-nightly" % MOZILLA_DIR,
+    "signature_verification_script": "tools/release/signing/verify-android-signature.sh",
+    "stage_product": "mobile",
+    "platform": "android", # XXX Validate
+    "build_type": "api-15-opt", # XXX Validate
+
+    # Balrog
+    "build_target": "Android_arm-eabi-gcc3",
+
+    # Mock
+    "mock_target": "mozilla-centos6-x86_64-android",
+    "mock_packages": ['autoconf213', 'python', 'zip', 'mozilla-python27-mercurial', 'git', 'ccache',
+                      'glibc-static', 'libstdc++-static', 'perl-Test-Simple', 'perl-Config-General',
+                      'gtk2-devel', 'libnotify-devel', 'yasm',
+                      'alsa-lib-devel', 'libcurl-devel',
+                      'wireless-tools-devel', 'libX11-devel',
+                      'libXt-devel', 'mesa-libGL-devel',
+                      'gnome-vfs2-devel', 'GConf2-devel', 'wget',
+                      'mpfr',  # required for system compiler
+                      'xorg-x11-font*',  # fonts required for PGO
+                      'imake',  # required for makedepend!?!
+                      'gcc45_0moz3', 'gcc454_0moz1', 'gcc472_0moz1', 'gcc473_0moz1', 'yasm', 'ccache',  # <-- from releng repo
+                      'valgrind', 'dbus-x11',
+                      'pulseaudio-libs-devel',
+                      'gstreamer-devel', 'gstreamer-plugins-base-devel',
+                      'freetype-2.3.11-6.el6_1.8.x86_64',
+                      'freetype-devel-2.3.11-6.el6_1.8.x86_64',
+                      'java-1.7.0-openjdk-devel',
+                      'openssh-clients',
+                      'zlib-devel-1.2.3-27.el6.i686',
+                      ],
+    "mock_files": [
+        ("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
+        ('/home/cltbld/.hgrc', '/builds/.hgrc'),
+        ('/builds/relengapi.tok', '/builds/relengapi.tok'),
+        ('/tools/tooltool.py', '/builds/tooltool.py'),
+        ('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
+    ],
+}