Bug 1119387 part 2: Add flame nightly build script.
authorWander Lairson Costa <wcosta@mozilla.com>
Wed, 25 Mar 2015 14:25:27 -0300
changeset 264481 04a63a93948e61edf577088b963344fbc1e1c45f
parent 264480 a22c81667a6f90d4e2faf410fa69287c1be914b6
child 264482 acb7171c400151a7bc249fa149e70977949e06e7
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1119387
milestone39.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 1119387 part 2: Add flame nightly build script. This will build flame and upload the results to ftp, balrog and symbol server.
testing/taskcluster/scripts/phone-builder/build-phone-nightly.sh
testing/taskcluster/tasks/builds/b2g_flame_kk_eng.yml
testing/taskcluster/tasks/builds/b2g_flame_kk_nightly.yml
testing/taskcluster/tasks/builds/b2g_flame_kk_opt.yml
testing/taskcluster/tasks/builds/b2g_phone_base.yml
testing/taskcluster/tasks/phone_build.yml
new file mode 100755
--- /dev/null
+++ b/testing/taskcluster/scripts/phone-builder/build-phone-nightly.sh
@@ -0,0 +1,48 @@
+#! /bin/bash -vex
+
+. pre-build.sh
+
+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 \
+
+# 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
+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/tasks/builds/b2g_flame_kk_eng.yml
+++ b/testing/taskcluster/tasks/builds/b2g_flame_kk_eng.yml
@@ -2,24 +2,31 @@
   from: 'tasks/builds/b2g_phone_base.yml'
 task:
   workerType: flame-kk
   scopes:
     - 'docker-worker:cache:build-flame-kk-eng'
   metadata:
     name: '[TC] B2G Flame KK Eng'
 
+  payload:
+    cache:
+      build-flame-kk-eng: /home/worker/workspace
+    env:
+      TARGET: 'flame-kk'
+      DEBUG: 0
+      VARIANT: eng
+    command:
+      - >
+        checkout-gecko workspace &&
+        cd ./workspace/gecko/testing/taskcluster/scripts/phone-builder &&
+        buildbot_step 'Build' ./build-phone.sh $HOME/workspace
   extra:
     treeherder:
       symbol: Be
       groupSymbol: Flame-KK
       groupName: Flame KitKat Device Image
       machine:
         platform: b2g-device-image
+    locations:
+      img: 'private/build/flame-kk.zip'
 
-  payload:
-    cache:
-      build-flame-kk-eng: /home/worker/object-folder
-    env:
-      TARGET: 'flame-kk'
-      DEBUG: 0
-      VARIANT: eng
 
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/b2g_flame_kk_nightly.yml
@@ -0,0 +1,32 @@
+$inherits:
+  from: 'tasks/builds/b2g_phone_base.yml'
+task:
+  workerType: flame-kk
+  scopes:
+    - 'docker-worker:cache:build-flame-kk-nightly'
+  metadata:
+    name: '[TC] B2G Flame KK Nightly'
+
+  payload:
+    cache:
+      build-flame-kk-nightly: /home/worker/object-folder
+    env:
+      TARGET: 'flame-kk'
+      DEBUG: 0
+    command:
+      - >
+        checkout-gecko workspace &&
+        cd ./workspace/gecko/testing/taskcluster/scripts/phone-builder &&
+        buildbot_step 'Build' ./build-phone-nightly.sh $HOME/workspace
+
+  extra:
+    treeherder:
+      symbol: B
+      groupSymbol: Flame-KK
+      groupName: Flame KitKat Device Image
+      machine:
+        platform: b2g-device-image
+    locations:
+      img: 'private/build/flame-kk.zip'
+      mar: 'public/build/b2g-flame-gecko-update.mar'
+
--- a/testing/taskcluster/tasks/builds/b2g_flame_kk_opt.yml
+++ b/testing/taskcluster/tasks/builds/b2g_flame_kk_opt.yml
@@ -4,20 +4,25 @@ task:
   workerType: flame-kk
   scopes:
     - 'docker-worker:cache:build-flame-kk-opt'
   metadata:
     name: '[TC] B2G Flame KK Opt'
 
   payload:
     cache:
-      build-flame-kk-opt: /home/worker/object-folder
+      build-flame-kk-opt: /home/worker/workspace
     env:
       TARGET: 'flame-kk'
       DEBUG: 0
+    command:
+      - >
+        checkout-gecko workspace &&
+        cd ./workspace/gecko/testing/taskcluster/scripts/phone-builder &&
+        buildbot_step 'Build' ./build-phone.sh $HOME/workspace
   extra:
     treeherder:
       symbol: B
       groupSymbol: Flame-KK
       groupName: Flame KitKat Device Image
       machine:
         platform: b2g-device-image
     locations:
--- a/testing/taskcluster/tasks/builds/b2g_phone_base.yml
+++ b/testing/taskcluster/tasks/builds/b2g_phone_base.yml
@@ -7,22 +7,16 @@ task:
   payload:
     env:
       REPO_TRACE: 1
       VARIANT: user
 
     # Emulators can take a very long time to build!
     maxRunTime: 14400
 
-    command:
-      - >
-        checkout-gecko workspace &&
-        cd ./workspace/gecko/testing/taskcluster/scripts/phone-builder &&
-        buildbot_step 'Build' ./build-phone.sh $HOME/workspace
-
   extra:
     # Rather then enforcing particular conventions we require that all build
     # tasks provide the "build" extra field to specify where the build and tests
     # files are located.
     locations:
       build: 'private/build/b2g-android-arm.tar.gz'
       tests: 'private/build/gaia.zip'
       symbols: 'private/build/b2g-crashreporter-symbols.zip'
--- a/testing/taskcluster/tasks/phone_build.yml
+++ b/testing/taskcluster/tasks/phone_build.yml
@@ -33,16 +33,20 @@ task:
       tc-vcs: '/home/worker/.tc-vcs'
 
     # All builds share a common artifact directory for ease of uploading.
     artifacts:
       'private/build':
         type: directory
         path: '/home/worker/artifacts/'
         expires: '{{#from_now}}1 year{{/from_now}}'
+      'public/build':
+        type: directory
+        path: '/home/worker/artifacts-public/'
+        expires: '{{#from_now}}1 year{{/from_now}}'
 
 
     env:
       # Common environment variables for checking out gecko
       GECKO_BASE_REPOSITORY: '{{base_repository}}'
       GECKO_HEAD_REPOSITORY: '{{head_repository}}'
       GECKO_HEAD_REV: '{{head_rev}}'
       GECKO_HEAD_REF: '{{head_ref}}'