Bug 1164623: align env variable names with B2G; r=mrrrgn draft
authorDustin J. Mitchell <dustin@mozilla.com>
Wed, 27 May 2015 12:26:06 -0400
changeset 268051 b4bf9c05125c96c6f60bf4ac7981f5badf2643a4
parent 268048 40f545f55723f89564a40d1e7f7dfead2fc4d49d
child 506439 4a9a675ae892b9dfe5a59d4403e8b9b22377adf8
push id2297
push userdmitchell@mozilla.com
push dateWed, 27 May 2015 16:31:30 +0000
reviewersmrrrgn
bugs1164623
milestone41.0a1
Bug 1164623: align env variable names with B2G; r=mrrrgn
testing/docker/desktop-build/bin/build.sh
testing/taskcluster/tasks/builds/android_api_11.yml
--- a/testing/docker/desktop-build/bin/build.sh
+++ b/testing/docker/desktop-build/bin/build.sh
@@ -2,27 +2,43 @@
 
 set -v -x -e
 
 # Inputs, with defaults
 
 : MOZHARNESS_SCRIPT             ${MOZHARNESS_SCRIPT}
 : MOZHARNESS_CONFIG             ${MOZHARNESS_CONFIG}
 
-: GECKO_BASE_REPOSITORY         ${GECKO_BASE_REPOSITORY:=https://hg.mozilla.org/mozilla-central}
-: GECKO_HEAD_REPOSITORY         ${GECKO_HEAD_REPOSITORY:=https://hg.mozilla.org/mozilla-central}
-: GECKO_REV                     ${GECKO_REV:=default}
+# mozharness builds use three repositories: gecko (source), mozharness (build
+# scripts) and tools (miscellaneous) for each, specify *_REPOSITORY.  If the
+# revision is not in the standard repo for the codebase, specify *_BASE_REPO as
+# the canonical repo to clone and *_HEAD_REPO as the repo containing the
+# desired revision.  For Mercurial clones, only *_HEAD_REV is required; for Git
+# clones, specify the branch name to fetch as *_HEAD_REF and the desired sha1
+# as *_HEAD_REV.  For compatibility, we also accept MOZHARNESS_{REV,REF}
+
+: GECKO_REPOSITORY              ${GECKO_REPOSITORY:=https://hg.mozilla.org/mozilla-central}
+: GECKO_BASE_REPOSITORY         ${GECKO_BASE_REPOSITORY:=${GECKO_REPOSITORY}}
+: GECKO_HEAD_REPOSITORY         ${GECKO_HEAD_REPOSITORY:=${GECKO_REPOSITORY}}
+: GECKO_HEAD_REV                ${GECKO_HEAD_REV:=default}
+: GECKO_HEAD_REF                ${GECKO_HEAD_REF:=${GECKO_HEAD_REV}}
 
-: MOZHARNESS_BASE_REPOSITORY    ${MOZHARNESS_BASE_REPOSITORY:=https://hg.mozilla.org/build/mozharness}
-: MOZHARNESS_HEAD_REPOSITORY    ${MOZHARNESS_HEAD_REPOSITORY:=https://hg.mozilla.org/build/mozharness}
+: MOZHARNESS_REPOSITORY         ${MOZHARNESS_REPOSITORY:=https://hg.mozilla.org/build/mozharness}
+: MOZHARNESS_BASE_REPOSITORY    ${MOZHARNESS_BASE_REPOSITORY:=${MOZHARNESS_REPOSITORY}}
+: MOZHARNESS_HEAD_REPOSITORY    ${MOZHARNESS_HEAD_REPOSITORY:=${MOZHARNESS_REPOSITORY}}
 : MOZHARNESS_REV                ${MOZHARNESS_REV:=production}
+: MOZHARNESS_REF                ${MOZHARNESS_REF:=${MOZHARNESS_REV}}
+: MOZHARNESS_HEAD_REV           ${MOZHARNESS_HEAD_REV:=${MOZHARNESS_REV}}
+: MOZHARNESS_HEAD_REF           ${MOZHARNESS_HEAD_REF:=${MOZHARNESS_REF}}
 
-: TOOLS_BASE_REPOSITORY         ${TOOLS_BASE_REPOSITORY:=https://hg.mozilla.org/build/tools}
-: TOOLS_HEAD_REPOSITORY         ${TOOLS_HEAD_REPOSITORY:=https://hg.mozilla.org/build/tools}
-: TOOLS_REV                     ${TOOLS_REV:=default}
+: TOOLS_REPOSITORY              ${TOOLS_REPOSITORY:=https://hg.mozilla.org/build/tools}
+: TOOLS_BASE_REPOSITORY         ${TOOLS_BASE_REPOSITORY:=${TOOLS_REPOSITORY}}
+: TOOLS_HEAD_REPOSITORY         ${TOOLS_HEAD_REPOSITORY:=${TOOLS_REPOSITORY}}
+: TOOLS_HEAD_REV                ${TOOLS_HEAD_REV:=default}
+: TOOLS_HEAD_REF                ${TOOLS_HEAD_REF:=${TOOLS_HEAD_REV}}
 
 : TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
 
 : RELENGAPI_TOKEN               ${RELENGAPI_TOKEN+HIDDEN}
 
 : NEED_XVFB                     ${NEED_XVFB:=false}
 
 : MH_CUSTOM_BUILD_VARIANT_CFG   ${MH_CUSTOM_BUILD_VARIANT_CFG}
@@ -55,27 +71,27 @@ if [[ -z ${MOZHARNESS_SCRIPT} ]]; then e
 if [[ -z ${MOZHARNESS_CONFIG} ]]; then exit 1; fi
 
 cleanup() {
     [ -n "$xvfb_pid" ] && kill $xvfb_pid
 }
 trap cleanup EXIT INT
 
 # check out mozharness
-tc-vcs checkout mozharness $MOZHARNESS_BASE_REPOSITORY $MOZHARNESS_HEAD_REPOSITORY $MOZHARNESS_REV
+tc-vcs checkout mozharness $MOZHARNESS_BASE_REPOSITORY $MOZHARNESS_HEAD_REPOSITORY $MOZHARNESS_HEAD_REV $MOZHARNESS_HEAD_REF
 
 # check out tools where mozharness expects it to be ($PWD/build/tools and $WORKSPACE/build/tools)
-tc-vcs checkout $WORKSPACE/build/tools $TOOLS_BASE_REPOSITORY $TOOLS_HEAD_REPOSITORY $TOOLS_REV
+tc-vcs checkout $WORKSPACE/build/tools $TOOLS_BASE_REPOSITORY $TOOLS_HEAD_REPOSITORY $TOOLS_HEAD_REV $TOOLS_HEAD_REF
 if [ ! -d build ]; then
     mkdir -p build
     ln -s $WORKSPACE/build/tools build/tools
 fi
 
 # and check out mozilla-central where mozharness will use it as a cache (/builds/hg-shared)
-tc-vcs checkout $WORKSPACE/build/src $GECKO_BASE_REPOSITORY $GECKO_HEAD_REPOSITORY $GECKO_REV
+tc-vcs checkout $WORKSPACE/build/src $GECKO_BASE_REPOSITORY $GECKO_HEAD_REPOSITORY $GECKO_HEAD_REV $GECKO_HEAD_REF
 
 # run mozharness in XVfb, if necessary; this is an array to maintain the quoting in the -s argument
 if $NEED_XVFB; then
     # Some mozharness scripts set DISPLAY=:2
     Xvfb :2 -screen 0 1024x768x24 &
     export DISPLAY=:2
     xvfb_pid=$!
     # Only error code 255 matters, because it signifies that no
--- a/testing/taskcluster/tasks/builds/android_api_11.yml
+++ b/testing/taskcluster/tasks/builds/android_api_11.yml
@@ -20,30 +20,27 @@ task:
 
   payload:
     image: '{{#docker_image}}desktop-build{{/docker_image}}'
     cache:
       build-android-api-11-workspace: '/home/worker/workspace'
       tooltool-cache: '/home/worker/tools/tooltool-cache'
 
     env:
-      # 1164623: rename this var
-      GECKO_REV: '{{head_rev}}'
-      # 1164623: rename these three vars
-      MOZHARNESS_BASE_REPOSITORY: '{{mozharness_repository}}'
-      MOZHARNESS_HEAD_REPOSITORY: '{{mozharness_repository}}'
-      MOZHARNESS_REV: '{{mozharness_rev}}'
-
+      # inputs to mozharness
       MOZHARNESS_SCRIPT: 'mozharness/scripts/fx_desktop_build.py'
       MOZHARNESS_CONFIG: 'builds/releng_base_android_64_builds.py'
       MH_CUSTOM_BUILD_VARIANT_CFG: api-11
       MH_BRANCH: {{project}}
       MH_BUILD_POOL: taskcluster
 
+      # image paths
       TOOLTOOL_CACHE: '/home/worker/tooltool-cache'
+
+      # authentication
       RELENGAPI_TOKEN: 'TODO' # 1164612: encrypt this secret
 
     maxRunTime: 36000
 
     command: ["/bin/bash", "bin/build.sh"]
 
   extra:
     treeherderEnv: