Bug 1426244 - 5. Add geckoview-docs job; r=nalexander draft
authorJim Chen <nchen@mozilla.com>
Tue, 09 Jan 2018 14:59:56 -0500
changeset 717890 2bfe36ef5f47e44442061365c250afda80194d93
parent 717889 47b7f849f7e3924f62309dd2e7a28f180028f573
child 745379 e7cf3644580e1beb35a5cb8b4f95aceeeceda4b8
push id94812
push userbmo:nchen@mozilla.com
push dateTue, 09 Jan 2018 20:00:30 +0000
reviewersnalexander
bugs1426244
milestone59.0a1
Bug 1426244 - 5. Add geckoview-docs job; r=nalexander Add a geckoview-docs job that executes "./mach android geckoview-docs", which takes care of calling gradle to generate the javadoc archive, and uploading it to Github using given parameters. MozReview-Commit-ID: DTWh4XdFZEO
taskcluster/ci/build/android-stuff.yml
taskcluster/ci/config.yml
taskcluster/docker/android-build/Dockerfile
testing/mozharness/configs/builds/releng_sub_android_configs/64_geckoview_docs.py
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/taskcluster/ci/build/android-stuff.yml
+++ b/taskcluster/ci/build/android-stuff.yml
@@ -201,8 +201,52 @@ android-findbugs/opt:
     optimization:
         skip-unless-changed:
             - "mobile/android/**/*.java"
             - "mobile/android/**/Makefile.in"
             - "mobile/android/config/**"
             - "mobile/android/gradle.configure"
             - "mobile/android/**/moz.build"
             - "**/*.gradle"
+
+android-geckoview-docs/opt:
+    description: "Android GeckoView docs"
+    index:
+        product: mobile
+        job-name: android-geckoview-docs
+    treeherder:
+        platform: android-4-0-armv7-api16/opt
+        kind: build
+        tier: 3
+        symbol: tc-A(gv-docs)
+    run-on-projects: [mozilla-central]
+    worker-type: aws-provisioner-v1/gecko-{level}-b-android
+    worker:
+        docker-image: {in-tree: android-build}
+        env:
+            GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
+            PERFHERDER_EXTRA_OPTIONS: android-geckoview-docs
+            GECKOVIEW_DOCS_UPLOAD_SECRET: "project/releng/gecko/build/level-{level}/geckoview-docs-upload"
+        artifacts:
+            - name: public/android/geckoview-docs/geckoview-javadoc.jar
+              path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/libs/geckoview-javadoc.jar
+              type: file
+        max-run-time: 36000
+    run:
+        using: mozharness
+        actions: [get-secrets build]
+        config:
+            - builds/releng_base_android_64_builds.py
+            - disable_signing.py
+            - platform_supports_post_upload_to_latest.py
+        script: "mozharness/scripts/fx_desktop_build.py"
+        secrets: true
+        custom-build-variant-cfg: android-geckoview-docs
+        tooltool-downloads: internal
+    toolchains:
+        - android-gradle-dependencies
+        - android-sdk-linux
+        - proguard-jar
+    optimization:
+        skip-unless-changed:
+            - "mobile/android/**/*.java"
+            - "mobile/android/gradle.configure"
+            - "**/*.gradle"
--- a/taskcluster/ci/config.yml
+++ b/taskcluster/ci/config.yml
@@ -76,16 +76,17 @@ index:
         - 'android-aarch64-opt'
         - 'android-api-16-debug'
         - 'android-api-16-gradle-opt'
         - 'android-api-16-old-id-opt'
         - 'android-api-16-opt'
         - 'android-checkstyle'
         - 'android-dependencies'
         - 'android-findbugs'
+        - 'android-geckoview-docs'
         - 'android-lint'
         - 'android-test'
         - 'android-x86-old-id-opt'
         - 'android-x86-opt'
         - 'browser-haz-debug'
         - 'linux-debug'
         - 'linux-devedition'
         - 'linux-devedition-opt'
--- a/taskcluster/docker/android-build/Dockerfile
+++ b/taskcluster/docker/android-build/Dockerfile
@@ -27,37 +27,34 @@ ENV HOME=/builds/worker \
     DEBIAN_FRONTEND=noninteractive
 
 # Set a default command useful for debugging.
 CMD ["/bin/bash", "--login"]
 
 # Set apt sources list to a snapshot.
 COPY sources.list /etc/apt/
 
-# We need i386 packages for the Android SDK.
-# Once https://bugzilla.mozilla.org/show_bug.cgi?id=1370119 is in-tree, we
-# will have 64-bit builds of everything, and we can then remove this and
-# the :i386 packages we install below.
-RUN dpkg --add-architecture i386
-
 # rsync is required for l10n single locale repacks.  less, screen, and
 # vim, help debugging interactive tasks in Task Cluster.
+# git and openssh-client are used to upload GeckoView javadoc to Github.
 RUN apt-get update -q && \
     apt-get install -yyq --no-install-recommends \
       autoconf2.13 \
       build-essential \
       base-files \
       ca-certificates \
       ccache \
       cmake \
       curl \
       file \
+      git \
       gnupg \
       less \
       make \
+      openssh-client \
       procps \
       python \
       python-cryptography \
       python-dev \
       python-pip \
       python-setuptools \
       python-virtualenv \
       rsync \
@@ -66,20 +63,16 @@ RUN apt-get update -q && \
       tar \
       unzip \
       uuid \
       vim \
       wget \
       xz-utils \
       yasm \
       zip \
-      libstdc++6:i386 \
-      libgcc1:i386 \
-      zlib1g:i386 \
-      libncurses5:i386 \
     && \
     apt-get clean
 
 # %include python/mozbuild/mozbuild/action/tooltool.py
 COPY topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /setup/tooltool.py
 
 # %include testing/mozharness/external_tools/robustcheckout.py
 COPY topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_sub_android_configs/64_geckoview_docs.py
@@ -0,0 +1,20 @@
+config = {
+    'base_name': 'Android GeckoView docs %(branch)s',
+    'stage_platform': 'android-geckoview-docs',
+    'build_type': 'api-16-opt',
+    'src_mozconfig': 'mobile/android/config/mozconfigs/android-api-16-frontend/nightly',
+    'multi_locale_config_platform': 'android',
+    # geckoview-docs doesn't produce a package. So don't collect package metrics.
+    'disable_package_metrics': True,
+    'postflight_build_mach_commands': [
+        ['android',
+         'geckoview-docs',
+         '--archive',
+         '--upload', 'mozilla/geckoview',
+         '--upload-branch', 'gh-pages/javadoc/{project}',
+         '--upload-message', 'Update {project} javadoc to rev {revision}',
+        ],
+    ],
+    'artifact_flag_build_variant_in_try': None, # There's no artifact equivalent.
+    'max_build_output_timeout': 0,
+}
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -440,16 +440,17 @@ class BuildOptionParser(object):
         'x86-old-id': 'builds/releng_sub_%s_configs/%s_x86_old_id.py',
         'x86-artifact': 'builds/releng_sub_%s_configs/%s_x86_artifact.py',
         'api-16-partner-sample1': 'builds/releng_sub_%s_configs/%s_api_16_partner_sample1.py',
         'aarch64': 'builds/releng_sub_%s_configs/%s_aarch64.py',
         'android-test': 'builds/releng_sub_%s_configs/%s_test.py',
         'android-checkstyle': 'builds/releng_sub_%s_configs/%s_checkstyle.py',
         'android-lint': 'builds/releng_sub_%s_configs/%s_lint.py',
         'android-findbugs': 'builds/releng_sub_%s_configs/%s_findbugs.py',
+        'android-geckoview-docs': 'builds/releng_sub_%s_configs/%s_geckoview_docs.py',
         'valgrind' : 'builds/releng_sub_%s_configs/%s_valgrind.py',
         'artifact': 'builds/releng_sub_%s_configs/%s_artifact.py',
         'debug-artifact': 'builds/releng_sub_%s_configs/%s_debug_artifact.py',
         'devedition': 'builds/releng_sub_%s_configs/%s_devedition.py',
         'dmd': 'builds/releng_sub_%s_configs/%s_dmd.py',
     }
     build_pool_cfg_file = 'builds/build_pool_specifics.py'
     branch_cfg_file = 'builds/branch_specifics.py'