Bug 1134226: Add lightsaber nightly builds.
authorWander Lairson Costa <wcosta@mozilla.com>
Tue, 14 Apr 2015 20:16:01 -0300
changeset 270472 c37edf9eaedc79b0d5012ee4ec28079d2f22a66a
parent 270471 06016c1dc314c33b1e0b91bbb35a274e1b7bb282
child 270473 c7e54b2f48f2e941127e606c5ec0e6aa9a4be62e
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1134226
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1134226: Add lightsaber nightly builds.
testing/docker/builder/Dockerfile
testing/docker/phone-builder/Dockerfile
testing/docker/phone-builder/VERSION
testing/docker/phone-builder/system-setup.sh
testing/taskcluster/scripts/phone-builder/build-lightsaber-nightly.sh
testing/taskcluster/scripts/phone-builder/build-phone-nightly.sh
testing/taskcluster/scripts/phone-builder/pre-build.sh
testing/taskcluster/tasks/branches/base_job_flags.yml
testing/taskcluster/tasks/branches/cypress/job_flags.yml
testing/taskcluster/tasks/builds/b2g_aries_lightsaber_nightly.yml
--- a/testing/docker/builder/Dockerfile
+++ b/testing/docker/builder/Dockerfile
@@ -16,16 +16,16 @@ RUN hg clone http://hg.mozilla.org/build
       cd /tools/tools && \
       python setup.py install
 
 # Initialize git (makes repo happy)
 RUN git config --global user.email "mozilla@example.com" && \
     git config --global user.name "mozilla"
 
 # VCS Tools
-RUN npm install -g taskcluster-vcs@2.3.4
+RUN npm install -g taskcluster-vcs@2.3.5
 
 # TODO enable worker
 # TODO volume mount permissions will be an issue
 # USER worker
 
 COPY bin /home/worker/bin
 RUN chmod a+x /home/worker/bin/*
--- a/testing/docker/phone-builder/Dockerfile
+++ b/testing/docker/phone-builder/Dockerfile
@@ -1,13 +1,14 @@
 FROM          quay.io/mozilla/builder:0.5.4
 MAINTAINER    Wander Lairson Costa <wcosta@mozilla.com>
 
 # Add utilities and configuration
 ADD           bin                   /home/worker/bin
 ADD           config                /home/worker/.aws/config
-ADD           system-setup.sh       /tmp/system-setup.sh
 
-RUN           /tmp/system-setup.sh
+RUN           yum install -y bc lzop
+RUN           pip install awscli
+RUN           npm install -g bower gulp apm grunt-cli
 
 # Set a default command useful for debugging
 ENTRYPOINT ["validate_task.py"]
 
--- a/testing/docker/phone-builder/VERSION
+++ b/testing/docker/phone-builder/VERSION
@@ -1,1 +1,1 @@
-0.0.12
+0.0.13
deleted file mode 100755
--- a/testing/docker/phone-builder/system-setup.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-pip install awscli
-
-# Necessary for dolhin kernel building
-yum install -y bc
-
-# Remove ourselves
-rm -f $0
new file mode 100755
--- /dev/null
+++ b/testing/taskcluster/scripts/phone-builder/build-lightsaber-nightly.sh
@@ -0,0 +1,49 @@
+#! /bin/bash -vex
+
+. pre-build.sh
+
+if [ 0$B2G_DEBUG -ne 0 ]; then
+    DEBUG_SUFFIX=-debug
+fi
+
+if [ $TARGET == "aries" -o $TARGET == "shinano" ]; then
+  # caching objects might be dangerous for some devices (aka aries)
+  rm -rf $WORKSPACE/B2G/objdir*
+  rm -rf $WORKSPACE/B2G/out
+fi
+
+aws s3 cp s3://b2g-nightly-credentials/balrog_credentials .
+mar_file=b2g-${TARGET%%-*}-gecko-update.mar
+
+./mozharness/scripts/b2g_lightsaber.py \
+  --config b2g/taskcluster-lightsaber-nightly.py \
+  --config balrog/staging.py \
+  "$debug_flag" \
+  --disable-mock \
+  --variant=$VARIANT \
+  --work-dir=$WORKSPACE/B2G \
+  --gaia-languages-file locales/languages_all.json \
+  --log-level=debug \
+  --target=$TARGET \
+  --b2g-config-dir=$TARGET \
+  --checkout-revision=$GECKO_HEAD_REV \
+  --base-repo=$GECKO_BASE_REPOSITORY \
+  --repo=$GECKO_HEAD_REPOSITORY \
+  --platform $TARGET \
+  --complete-mar-url https://queue.taskcluster.net/v1/task/$TASK_ID/runs/$RUN_ID/artifacts/public/build/$mar_file \
+
+# Don't cache backups
+rm -rf $WORKSPACE/B2G/backup-*
+rm -f balrog_credentials
+
+mkdir -p $HOME/artifacts
+mkdir -p $HOME/artifacts-public
+
+mv $WORKSPACE/B2G/upload-public/$mar_file $HOME/artifacts-public/
+mv $WORKSPACE/B2G/upload/sources.xml $HOME/artifacts/sources.xml
+#mv $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip
+mv $WORKSPACE/B2G/upload/b2g-*.android-arm.tar.gz $HOME/artifacts/b2g-android-arm.tar.gz
+mv $WORKSPACE/B2G/upload/${TARGET}.zip $HOME/artifacts/${TARGET}.zip
+mv $WORKSPACE/B2G/upload/gaia.zip $HOME/artifacts/gaia.zip
+ccache -s
+
--- a/testing/taskcluster/scripts/phone-builder/build-phone-nightly.sh
+++ b/testing/taskcluster/scripts/phone-builder/build-phone-nightly.sh
@@ -6,39 +6,37 @@ if [ 0$B2G_DEBUG -ne 0 ]; then
     DEBUG_SUFFIX=-debug
 fi
 
 if [ ! -d $HOME/.ssh ]; then
     mkdir $HOME/.ssh
 fi
 
 aws s3 cp s3://b2g-nightly-credentials/balrog_credentials .
-aws s3 cp s3://b2g-nightly-credentials/b2g-rsa $HOME/.ssh/
 
 ./mozharness/scripts/b2g_build.py \
   --config b2g/taskcluster-phone-nightly.py \
   --config balrog/staging.py \
   "$debug_flag" \
   --disable-mock \
   --variant=$VARIANT \
   --work-dir=$WORKSPACE/B2G \
   --gaia-languages-file locales/languages_all.json \
   --log-level=debug \
   --target=$TARGET \
   --b2g-config-dir=$TARGET \
   --checkout-revision=$GECKO_HEAD_REV \
   --base-repo=$GECKO_BASE_REPOSITORY \
   --repo=$GECKO_HEAD_REPOSITORY \
   --platform $TARGET \
-  --complete-mar-url https://queue.taskcluster.net/v1/task/$TASK_ID/runs/0/artifacts/public/build/b2g-${TARGET%%-*}-gecko-update.mar \
+  --complete-mar-url https://queue.taskcluster.net/v1/task/$TASK_ID/runs/$RUN_ID/artifacts/public/build/b2g-${TARGET%%-*}-gecko-update.mar \
 
 # Don't cache backups
 rm -rf $WORKSPACE/B2G/backup-*
 rm -f balrog_credentials
-rm -f $HOME/.ssh/b2g-rsa
 
 mkdir -p $HOME/artifacts
 mkdir -p $HOME/artifacts-public
 
 mv $WORKSPACE/B2G/upload-public/b2g-flame-gecko-update.mar $HOME/artifacts-public/b2g-flame-gecko-update.mar
 mv $WORKSPACE/B2G/upload/sources.xml $HOME/artifacts/sources.xml
 #mv $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip
 mv $WORKSPACE/B2G/upload/b2g-*.android-arm.tar.gz $HOME/artifacts/b2g-android-arm.tar.gz
--- a/testing/taskcluster/scripts/phone-builder/pre-build.sh
+++ b/testing/taskcluster/scripts/phone-builder/pre-build.sh
@@ -14,24 +14,17 @@ test $GECKO_HEAD_REV # Should be an hg r
 test $MOZHARNESS_REPOSITORY # mozharness repository
 test $MOZHARNESS_REV # mozharness revision
 test $MOZHARNESS_REF # mozharness ref
 test $TARGET
 test $VARIANT
 
 . ../builder/setup-ccache.sh
 
-# First check if the mozharness directory is available. This is intended to be
-# used locally in development to test mozharness changes:
-#
-#   $ docker -v your_mozharness:/home/worker/mozharness ...
-#
-if [ ! -d mozharness ]; then
-  tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV $MOZHARNESS_REF
-fi
+tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV $MOZHARNESS_REF
 
 # Figure out where the remote manifest is so we can use caches for it.
 MANIFEST=$(repository-url.py $GECKO_HEAD_REPOSITORY $GECKO_HEAD_REV b2g/config/$TARGET/sources.xml)
 tc-vcs repo-checkout $WORKSPACE/B2G https://git.mozilla.org/b2g/B2G.git $MANIFEST
 
 # Ensure symlink has been created to gecko...
 rm -f $WORKSPACE/B2G/gecko
 ln -s $WORKSPACE/gecko $WORKSPACE/B2G/gecko
--- a/testing/taskcluster/tasks/branches/base_job_flags.yml
+++ b/testing/taskcluster/tasks/branches/base_job_flags.yml
@@ -17,16 +17,17 @@ flags:
     - macosx64_gecko # b2g desktop osx 64 bit
     - win32_gecko    # b2g desktop win 32 bit
     - flame-kk       # b2g flame kitkat
     - flame-kk-eng   # b2g flame eng build
     - dolphin
     - dolphin-eng
     - dolphin-512
     - dolphin-512-eng
+    - aries-nightly
 
   tests:
     - cppunit
     - crashtest
     - crashtest-ipc
     - gaia-build
     - gaia-build-unit
     - gaia-js-integration
--- a/testing/taskcluster/tasks/branches/cypress/job_flags.yml
+++ b/testing/taskcluster/tasks/branches/cypress/job_flags.yml
@@ -13,16 +13,22 @@ builds:
       opt:
         task: tasks/builds/b2g_flame_kk_opt.yml
   flame-kk-eng:
     platforms:
       - b2g
     types:
       opt:
         task: tasks/builds/b2g_flame_kk_eng.yml
+  aries-nightly:
+    platforms:
+      - b2g
+    types:
+      opt:
+        task: tasks/builds/b2g_aries_lightsaber_nightly.yml
 
 tests:
   gaia-build:
     allowed_build_tasks:
       tasks/builds/b2g_flame_kk_opt.yml:
         task: tasks/tests/b2g_build_test.yml
       tasks/builds/b2g_flame_kk_eng.yml:
         task: tasks/tests/b2g_build_test.yml
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/b2g_aries_lightsaber_nightly.yml
@@ -0,0 +1,35 @@
+$inherits:
+  from: 'tasks/builds/b2g_phone_base.yml'
+  variables:
+    build_name: 'aries'
+    build_type: 'nightly'
+task:
+  workerType: flame-kk
+  scopes:
+    - 'docker-worker:cache:build-aries-lightsaber-nightly'
+  metadata:
+    name: '[TC] B2G Aries Nightly'
+
+  payload:
+    cache:
+      build-aries-lightsaber-nightly: /home/worker/workspace
+    env:
+      TARGET: 'aries'
+      DEBUG: 0
+    command:
+      - >
+        checkout-gecko workspace &&
+        cd ./workspace/gecko/testing/taskcluster/scripts/phone-builder &&
+        buildbot_step 'Build' ./build-lightsaber-nightly.sh $HOME/workspace
+
+  extra:
+    treeherder:
+      symbol: B
+      groupSymbol: Aries
+      groupName: Aries Device Image
+      machine:
+        platform: b2g-device-image
+    locations:
+      img: 'private/build/aries.zip'
+      mar: 'public/build/b2g-aries-gecko-update.mar'
+