Bug 1185643: use in-tree mozharness; r=wander r=mrrrgn

This required moving the custom mozharness configs out of the builder image
(which puts them in ~, where mozharness no longer looks) and moves them into
mozharness itself.

--HG--
rename : testing/docker/desktop-build/configs/disable_signing.py => testing/mozharness/configs/disable_signing.py
rename : testing/docker/desktop-build/configs/platform_supports_post_upload_to_latest.py => testing/mozharness/configs/platform_supports_post_upload_to_latest.py
extra : commitid : LUhLDQkhme1
extra : rebase_source : c4cc73de99939e22dd1317ce2d9b26671b67947a
This commit is contained in:
Dustin J. Mitchell 2015-07-27 15:21:15 -04:00
Родитель 71a768eee5
Коммит d149b29eb0
8 изменённых файлов: 3 добавлений и 50 удалений

Просмотреть файл

@ -6,9 +6,6 @@ MAINTAINER Morgan Reece Phillips <winter2718@gmail.com>
ADD bin /home/worker/bin
RUN chmod +x /home/worker/bin/*
# Add custom mozharness configs
ADD configs /home/worker/configs
##
# COMPILER HACKS
##

Просмотреть файл

@ -10,7 +10,7 @@ set -x -e
# 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}
# as *_HEAD_REV.
: GECKO_REPOSITORY ${GECKO_REPOSITORY:=https://hg.mozilla.org/mozilla-central}
: GECKO_BASE_REPOSITORY ${GECKO_BASE_REPOSITORY:=${GECKO_REPOSITORY}}
@ -18,15 +18,6 @@ set -x -e
: GECKO_HEAD_REV ${GECKO_HEAD_REV:=default}
: GECKO_HEAD_REF ${GECKO_HEAD_REF:=${GECKO_HEAD_REV}}
: 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}}
: MOZHARNESS_DISABLE ${MOZHARNESS_DISABLE:=false}
: 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}}
@ -42,12 +33,6 @@ set -x -e
set -v
# check out mozharness
if [ ! "$MOZHARNESS_DISABLE" = "true" ]
then
tc-vcs checkout mozharness $MOZHARNESS_BASE_REPOSITORY $MOZHARNESS_HEAD_REPOSITORY $MOZHARNESS_HEAD_REV $MOZHARNESS_HEAD_REF
fi
# check out tools where mozharness expects it to be ($PWD/build/tools and $WORKSPACE/build/tools)
if [ ! "$TOOLS_DISABLE" = true ]
then
@ -59,5 +44,4 @@ then
fi
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_HEAD_REV $GECKO_HEAD_REF

Просмотреть файл

@ -10,7 +10,7 @@ set -x -e
# 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}
# as *_HEAD_REV.
: GECKO_REPOSITORY ${GECKO_REPOSITORY:=https://hg.mozilla.org/mozilla-central}
: GECKO_BASE_REPOSITORY ${GECKO_BASE_REPOSITORY:=${GECKO_REPOSITORY}}
@ -18,31 +18,16 @@ set -x -e
: GECKO_HEAD_REV ${GECKO_HEAD_REV:=default}
: GECKO_HEAD_REF ${GECKO_HEAD_REF:=${GECKO_HEAD_REV}}
: 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_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}}
: MH_CUSTOM_BUILD_VARIANT_CFG ${MH_CUSTOM_BUILD_VARIANT_CFG}
: MH_BRANCH ${MH_BRANCH:=mozilla-central}
: MH_BUILD_POOL ${MH_BUILD_POOL:=staging}
: WORKSPACE ${WORKSPACE:=/home/worker/workspace}
set -v
# check out mozharness
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_HEAD_REV $TOOLS_HEAD_REF
if [ ! -d build ]; then
@ -50,5 +35,4 @@ if [ ! -d build ]; then
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_HEAD_REV $GECKO_HEAD_REF

Просмотреть файл

@ -21,7 +21,6 @@ from mach.decorators import (
ROOT = os.path.dirname(os.path.realpath(__file__))
GECKO = os.path.realpath(os.path.join(ROOT, '..', '..'))
DOCKER_ROOT = os.path.join(ROOT, '..', 'docker')
MOZHARNESS_CONFIG = os.path.join(GECKO, 'testing', 'mozharness', 'mozharness.json')
# XXX: If/when we have the taskcluster queue use construct url instead
ARTIFACT_URL = 'https://queue.taskcluster.net/v1/task/{}/artifacts/{}'
@ -40,10 +39,6 @@ DEFAULT_JOB_PATH = os.path.join(
ROOT, 'tasks', 'branches', 'base_jobs.yml'
)
def load_mozharness_info():
with open(MOZHARNESS_CONFIG) as content:
return json.load(content)
def docker_image(name):
''' Determine the docker tag/revision from an in tree docker file '''
repository_path = os.path.join(DOCKER_ROOT, name, 'REGISTRY')
@ -263,7 +258,6 @@ class Graph(object):
jobs = templates.load(job_path, {})
job_graph = parse_commit(message, jobs)
mozharness = load_mozharness_info()
# Template parameters used when expanding the graph
parameters = dict(gaia_info().items() + {
@ -278,9 +272,6 @@ class Graph(object):
'owner': params['owner'],
'from_now': json_time_from_now,
'now': current_json_time(),
'mozharness_repository': mozharness['repo'],
'mozharness_rev': mozharness['revision'],
'mozharness_ref':mozharness.get('reference', mozharness['revision']),
'revision_hash': params['revision_hash']
}.items())

Просмотреть файл

@ -118,7 +118,7 @@ done
# Mozharness would ordinarily do the checkouts itself, but they are disabled
# here (--no-checkout-sources, --no-clone-tools) as the checkout is performed above.
./${MOZHARNESS_SCRIPT} ${config_cmds} \
$WORKSPACE/build/src/testing/${MOZHARNESS_SCRIPT} ${config_cmds} \
$debug_flag \
$custom_build_variant_cfg_flag \
--disable-mock \

Просмотреть файл

@ -52,9 +52,6 @@ task:
GECKO_HEAD_REPOSITORY: '{{head_repository}}'
GECKO_HEAD_REV: '{{head_rev}}'
GECKO_HEAD_REF: '{{head_ref}}'
MOZHARNESS_REPOSITORY: '{{mozharness_repository}}'
MOZHARNESS_REV: '{{mozharness_rev}}'
MOZHARNESS_REF: '{{mozharness_ref}}'
TOOLTOOL_REPO: 'https://github.com/mozilla/build-tooltool'
TOOLTOOL_REV: 'master'