Bug 1119387 part 3: Add option to specify mozharness branch.

Allow the user to specify the mozharness branch to use
through the option --mozharness-ref.
This commit is contained in:
Wander Lairson Costa 2015-03-25 14:25:27 -03:00
parent 2ee30b7442
commit e97d7592ad
5 changed files with 14 additions and 2 deletions

View File

@ -210,6 +210,9 @@ class Graph(object):
@CommandArgument('--mozharness-rev',
default='default',
help='Commit revision to use from mozharness repository')
@CommandArgument('--mozharness-ref',
default='master',
help='Commit ref to use from mozharness repository')
@CommandArgument('--message',
help='Commit message to be parsed. Example: "try: -b do -p all -u all"')
@CommandArgument('--revision-hash',
@ -255,6 +258,7 @@ class Graph(object):
'now': datetime.datetime.now().isoformat(),
'mozharness_repository': params['mozharness_repository'],
'mozharness_rev': params['mozharness_rev'],
'mozharness_ref': params['mozharness_ref'],
'revision_hash': params['revision_hash']
}.items())
@ -424,6 +428,9 @@ class CIBuild(object):
@CommandArgument('--mozharness-rev',
default='tip',
help='Commit revision to use from mozharness repository')
@CommandArgument('--mozharness-ref',
default='master',
help='Commit ref to use from mozharness repository')
@CommandArgument('--owner',
required=True,
help='email address of who owns this graph')
@ -452,6 +459,7 @@ class CIBuild(object):
'head_rev': head_rev,
'head_ref': head_ref,
'mozharness_repository': params['mozharness_repository'],
'mozharness_ref': params['mozharness_ref'],
'mozharness_rev': params['mozharness_rev']
}

View File

@ -13,6 +13,7 @@ test $GECKO_BASE_REPOSITORY # Should be an hg repository url to clone from
test $GECKO_HEAD_REV # Should be an hg revision to pull down
test $MOZHARNESS_REPOSITORY # mozharness repository
test $MOZHARNESS_REV # mozharness revision
test $MOZHARNESS_REF # mozharness ref
test $TARGET
. setup-ccache.sh
@ -23,7 +24,7 @@ test $TARGET
# $ docker -v your_mozharness:/home/worker/mozharness ...
#
if [ ! -d mozharness ]; then
tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV
tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV $MOZHARNESS_REF
fi
# Figure out where the remote manifest is so we can use caches for it.

View File

@ -13,6 +13,7 @@ test $GECKO_BASE_REPOSITORY # Should be an hg repository url to clone from
test $GECKO_HEAD_REV # Should be an hg revision to pull down
test $MOZHARNESS_REPOSITORY # mozharness repository
test $MOZHARNESS_REV # mozharness revision
test $MOZHARNESS_REF # mozharness ref
test $TARGET
test $VARIANT
@ -24,7 +25,7 @@ test $VARIANT
# $ docker -v your_mozharness:/home/worker/mozharness ...
#
if [ ! -d mozharness ]; then
tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV
tc-vcs checkout mozharness $MOZHARNESS_REPOSITORY $MOZHARNESS_REPOSITORY $MOZHARNESS_REV $MOZHARNESS_REF
fi
# Figure out where the remote manifest is so we can use caches for it.

View File

@ -51,6 +51,7 @@ task:
GECKO_HEAD_REF: '{{head_ref}}'
MOZHARNESS_REPOSITORY: '{{mozharness_repository}}'
MOZHARNESS_REV: '{{mozharness_rev}}'
MOZHARNESS_REF: '{{mozharness_ref}}'
extra:
treeherder:

View File

@ -52,6 +52,7 @@ task:
GECKO_HEAD_REF: '{{head_ref}}'
MOZHARNESS_REPOSITORY: '{{mozharness_repository}}'
MOZHARNESS_REV: '{{mozharness_rev}}'
MOZHARNESS_REF: '{{mozharness_ref}}'
extra:
treeherder: