Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

merged from default

changeset:   1498:44a9e9f4e9ce
parent:      1496:e50aaf94e8f0
user:        Jonathan Griffin <jgriffin@mozilla.com>
date:        Fri May 03 10:43:39 2013 -0700
summary:     Bug 868490 - Make mozharness accept extra files in buildprops.json if !require_test_zip, r=aki

changeset:   1499:fcf687be070c
user:        Chris AtLee <catlee@mozilla.com>
date:        Fri May 03 15:07:40 2013 -0400
summary:     Bug 861426: Support nightly_update_channel config, and separate out device and branch update URLs. r=aki

changeset:   1500:0adb324a74e3
tag:         tip
user:        Chris AtLee <catlee@mozilla.com>
date:        Fri May 03 17:39:59 2013 -0400
summary:     Bug 861426: add config for private builds with updates. r=aki

--HG--
branch : production
  • Loading branch information...
commit b81644e1ec679807630e1adc93521f18f3562366 2 parents ecc2132 + 21f178b
Chris AtLee catlee authored
4 configs/b2g/releng-beta.py
View
@@ -33,8 +33,8 @@
},
"update": {
"upload_remote_host": "update.boot2gecko.org",
- "upload_remote_basepath": "/data/update-channels/nightly",
- "base_url": "http://update.boot2gecko.org/nightly/",
+ "upload_remote_basepath": "/data/update-channels/{target}/{version}/{publish_channel}",
+ "base_url": "http://update.boot2gecko.org/{target}/{version}/{update_channel}/",
"ssh_key": os.path.expanduser("~/.ssh/b2gbld_dsa"),
"ssh_user": "ec2-user",
"autopublish": False,
82 configs/b2g/releng-private-updates.py
View
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+import os
+config = {
+ "default_actions": [
+ 'clobber',
+ 'checkout-sources',
+ 'get-blobs',
+ 'update-source-manifest',
+ 'build',
+ 'build-symbols',
+ 'make-updates',
+ 'make-update-xml',
+ 'make-socorro-json',
+ 'upload-updates',
+ 'prep-upload',
+ 'upload',
+ 'upload-source-manifest',
+ ],
+ "ssh_key": os.path.expanduser("~/.ssh/b2gbld_dsa"),
+ "ssh_user": "b2gbld",
+ "upload_remote_host": "pvtbuilds.pvt.build.mozilla.org",
+ "upload_remote_basepath": "/pvt/mozilla.org/b2gotoro/tinderbox-builds",
+ "upload_remote_nightly_basepath": "/pvt/mozilla.org/b2gotoro/nightly",
+ "upload_dep_target_exclusions": ["unagi", "otoro", "inari", "leo", "hamachi"],
+ "tooltool_servers": ["http://runtime-binaries.pvt.build.mozilla.org/tooltool/"],
+ "gittool_share_base": "/builds/git-shared/git",
+ "gittool_base_mirror_urls": [],
+ "hgtool_share_base": "/builds/hg-shared",
+ "hgtool_base_mirror_urls": ["http://hg-internal.dmz.scl3.mozilla.com"],
+ "hgtool_base_bundle_urls": ["http://ftp.mozilla.org/pub/mozilla.org/firefox/bundles"],
+ "exes": {
+ "tooltool.py": "/tools/tooltool.py",
+ },
+ "manifest": {
+ "upload_remote_host": "stage.mozilla.org",
+ "upload_remote_basepath": "/pub/mozilla.org/b2g/manifests/%(version)s",
+ "ssh_key": os.path.expanduser("~/.ssh/b2gbld_dsa"),
+ "ssh_user": "b2gbld",
+ "branches": {
+ 'mozilla-b2g18_v1_0_0': '1.0.0',
+ 'mozilla-b2g18_v1_0_1': '1.0.1',
+ 'mozilla-b2g18': '1.1.0',
+ 'mozilla-central': '2.0.0',
+ },
+ "translate_hg_to_git": True,
+ "translate_base_url": "http://cruncher.build.mozilla.org/mapper",
+ },
+ "env": {
+ "CCACHE_DIR": "/builds/ccache",
+ "CCACHE_COMPRESS": "1",
+ "CCACHE_UMASK": "002",
+ "GAIA_OPTIMIZE": "1",
+ "SYMBOL_SERVER_HOST": "symbolpush.mozilla.org",
+ "SYMBOL_SERVER_USER": "b2gbld",
+ "SYMBOL_SERVER_SSH_KEY": "/home/mock_mozilla/.ssh/b2gbld_dsa",
+ "SYMBOL_SERVER_PATH": "/mnt/netapp/breakpad/symbols_b2g/",
+ "POST_SYMBOL_UPLOAD_CMD": "/usr/local/bin/post-symbol-upload.py",
+ },
+ "purge_minsize": 15,
+ "clobberer_url": "http://clobberer.pvt.build.mozilla.org/index.php",
+ "is_automation": True,
+ "repo_mirror_dir": "/builds/git-shared/repo",
+ "repo_remote_mappings": {
+ 'https://android.googlesource.com/': 'https://git.mozilla.org/external/aosp',
+ 'git://codeaurora.org/': 'https://git.mozilla.org/external/caf',
+ 'https://git.mozilla.org/b2g': 'https://git.mozilla.org/b2g',
+ 'git://github.com/mozilla-b2g/': 'https://git.mozilla.org/b2g',
+ 'git://github.com/mozilla/': 'https://git.mozilla.org/b2g',
+ 'https://git.mozilla.org/releases': 'https://git.mozilla.org/releases',
+ 'http://android.git.linaro.org/git-ro/': 'https://git.mozilla.org/external/linaro',
+ 'git://github.com/apitrace/': 'https://git.mozilla.org/external/apitrace',
+ },
+ "update": {
+ "upload_remote_host": "update.boot2gecko.org",
+ "upload_remote_basepath": "/data/update-channels/{target}/{version}/{publish_channel}",
+ "base_url": "http://update.boot2gecko.org/{target}/{version}/{update_channel}/",
+ "ssh_key": os.path.expanduser("~/.ssh/b2gbld_dsa"),
+ "ssh_user": "ec2-user",
+ "autopublish": False,
+ },
+ "nightly_update_channel": "nightly",
+}
9 mozharness/mozilla/testing/testbase.py
View
@@ -93,11 +93,14 @@ def postflight_read_buildbot_config(self):
message = "Unable to set %s from the buildbot config"
try:
files = self.buildbot_config['sourcestamp']['changes'][-1]['files']
- expected_length = 1
+ # Bug 868490 - Only require exactly two files if require_test_zip;
+ # otherwise accept either 1 or 2, since we'll be getting a
+ # test_zip url that we don't need.
+ expected_length = [1, 2]
if c.get("require_test_zip"):
- expected_length = 2
+ expected_length = [2]
actual_length = len(files)
- if actual_length != expected_length:
+ if actual_length not in expected_length:
self.fatal("Unexpected number of files in buildbot config %s: %d != %d!" % (c['buildbot_json_path'], actual_length, expected_length))
for f in files:
if f['name'].endswith('tests.zip'): # yuk
57 scripts/b2g_build.py
View
@@ -119,6 +119,14 @@ class B2GBuild(LocalesMixin, MockMixin, PurgeMixin, BaseScript, VCSMixin, Toolto
"dest": "update_channel",
"help": "b2g update channel",
}],
+ [["--nightly-update-channel"], {
+ "dest": "nightly_update_channel",
+ "help": "b2g update channel for nightly builds",
+ }],
+ [["--publish-channel"], {
+ "dest": "publish_channel",
+ "help": "channel where build is published to",
+ }],
]
def __init__(self, require_config_file=False):
@@ -185,7 +193,7 @@ def __init__(self, require_config_file=False):
'compare_locales_vcs': 'hgtool',
'repo_repo': "https://git.mozilla.org/external/google/gerrit/git-repo.git",
'repo_remote_mappings': {},
- 'update_channel': 'nightly',
+ 'update_channel': 'default',
},
)
@@ -292,6 +300,22 @@ def query_version(self):
if version:
return version.group(1)
+ def query_b2g_version(self):
+ manifest_config = self.config.get('manifest')
+ branch = self.query_branch()
+ if not manifest_config or not branch:
+ return 'default'
+ if branch not in manifest_config['branches']:
+ return 'default'
+ version = manifest_config['branches'][branch]
+ return version
+
+ def query_update_channel(self):
+ if self.query_is_nightly() and 'nightly_update_channel' in self.config:
+ return self.config['nightly_update_channel']
+ else:
+ return self.config['update_channel']
+
def query_revision(self):
if 'revision' in self.buildbot_properties:
return self.buildbot_properties['revision']
@@ -383,7 +407,11 @@ def query_build_env(self):
env['MOZ_BUILD_DATE'] = self.buildbot_config['properties']['buildid']
if 'B2G_UPDATE_CHANNEL' not in env:
- env['B2G_UPDATE_CHANNEL'] = self.config['update_channel']
+ env['B2G_UPDATE_CHANNEL'] = "{target}/{version}/{channel}".format(
+ target=self.config['target'],
+ channel=self.query_update_channel(),
+ version=self.query_b2g_version(),
+ )
return env
@@ -1219,7 +1247,7 @@ def make_socorro_json(self):
socorro_dict = {
'buildid': self.query_buildid(),
'version': self.query_version(),
- 'update_channel': self.config.get('update_channel'),
+ 'update_channel': self.query_update_channel(),
#'beta_number': n/a until we build b2g beta releases
}
file_path = os.path.join(dirs['abs_work_dir'], 'socorro.json')
@@ -1334,6 +1362,14 @@ def make_update_xml(self):
dated_application_ini = "application_%s.ini" % suffix
dated_sources_xml = "b2g_update_source_%s.xml" % suffix
mar_url = self.config['update']['base_url'] + dated_mar
+ update_channel = self.query_update_channel()
+ publish_channel = self.config.get('publish_channel', update_channel)
+ mar_url = mar_url.format(
+ update_channel=update_channel,
+ publish_channel=publish_channel,
+ version=self.query_b2g_version(),
+ target=self.config['target'],
+ )
self.info("Generating update.xml for %s" % mar_url)
if not self.create_update_xml(self.marfile, self.query_version(),
@@ -1371,12 +1407,23 @@ def upload_updates(self):
upload_dir = dirs['abs_upload_dir'] + '-updates'
# upload dated files first to be sure that update.xml doesn't
# point to not existing files
+ update_channel = self.query_update_channel()
+ publish_channel = self.config.get('publish_channel', update_channel)
+ if publish_channel is None:
+ publish_channel = update_channel
+ upload_remote_basepath = self.config['update']['upload_remote_basepath']
+ upload_remote_basepath = upload_remote_basepath.format(
+ update_channel=update_channel,
+ publish_channel=publish_channel,
+ version=self.query_b2g_version(),
+ target=self.config['target'],
+ )
retval = self.rsync_upload_directory(
upload_dir,
self.config['update']['ssh_key'],
self.config['update']['ssh_user'],
self.config['update']['upload_remote_host'],
- self.config['update']['upload_remote_basepath'],
+ upload_remote_basepath,
rsync_options=['-azv', "--exclude=update.xml"]
)
if retval is not None:
@@ -1392,7 +1439,7 @@ def upload_updates(self):
self.config['update']['ssh_key'],
self.config['update']['ssh_user'],
self.config['update']['upload_remote_host'],
- self.config['update']['upload_remote_basepath'],
+ upload_remote_basepath,
)
if retval is not None:
Please sign in to comment.
Something went wrong with that request. Please try again.