def generate_data(self, appVersion, productName, version, buildNumber, updateChannels, ftpServer, bouncerServer, enUSPlatforms, schemaVersion, openURL=None, **updateKwargs): assert schemaVersion in ( 3, 4), 'Unhandled schema version %s' % schemaVersion details_product = productName.lower() if details_product == "devedition": details_product = "firefox" data = { 'detailsUrl': getProductDetails(details_product, appVersion), 'platforms': {}, 'fileUrls': {}, 'appVersion': appVersion, 'platformVersion': appVersion, 'displayVersion': getPrettyVersion(version) } actions = [] if openURL: actions.append("showURL") data["openURL"] = openURL if actions: data["actions"] = " ".join(actions) fileUrls = self._getFileUrls(productName, version, buildNumber, updateChannels, ftpServer, bouncerServer, **updateKwargs) if fileUrls: data.update(fileUrls) updateData = self._get_update_data(productName, version, **updateKwargs) if updateData: data.update(updateData) for platform in enUSPlatforms: updatePlatforms = buildbot2updatePlatforms(platform) bouncerPlatform = buildbot2bouncer(platform) ftpPlatform = buildbot2ftp(platform) data['platforms'][updatePlatforms[0]] = { 'OS_BOUNCER': bouncerPlatform, 'OS_FTP': ftpPlatform } for aliasedPlatform in updatePlatforms[1:]: data['platforms'][aliasedPlatform] = { 'alias': updatePlatforms[0] } return data
def generate_data(self, appVersion, productName, version, buildNumber, updateChannels, stagingServer, bouncerServer, enUSPlatforms, schemaVersion, **updateKwargs): assert schemaVersion in (2, 3), 'Unhandled schema version %s' % schemaVersion self.name = get_release_blob_name(productName, version, buildNumber) data = { 'name': self.name, 'detailsUrl': getProductDetails(productName.lower(), appVersion), 'platforms': {}, 'fileUrls': {}, 'ftpFilenames': {}, 'bouncerProducts': {}, } data['appVersion'] = appVersion data['platformVersion'] = appVersion data['displayVersion'] = getPrettyVersion(version) # XXX: This is a hack for bug 1045583. We should remove it, and always # use "candidates" for nightlyDir after the switch to Balrog is complete. if productName.lower() == "mobile": nightlyDir = "candidates" else: nightlyDir = "nightly" for channel in updateChannels: if channel in ('betatest', 'esrtest') or "localtest" in channel: dir_ = makeCandidatesDir(productName.lower(), version, buildNumber, server=stagingServer, protocol='http', nightlyDir=nightlyDir) data['fileUrls'][channel] = '%supdate/%%OS_FTP%%/%%LOCALE%%/%%FILENAME%%' % dir_ else: url = 'http://%s/?product=%%PRODUCT%%&os=%%OS_BOUNCER%%&lang=%%LOCALE%%' % bouncerServer data['fileUrls'][channel] = url # XXX: quick hack for bug 1021026. We should be using Bouncer for this # after we implement better solution talked about in comments 2 through 4 if channel == 'release': dir_ = makeCandidatesDir(productName.lower(), version, buildNumber, server='download.cdn.mozilla.net', protocol='http', nightlyDir=nightlyDir) url = '%supdate/%%OS_FTP%%/%%LOCALE%%/%%FILENAME%%' % dir_ data['fileUrls']['beta'] = url data['fileUrls']['beta-cdntest'] = url data.update(self._get_update_data(productName, version, **updateKwargs)) for platform in enUSPlatforms: updatePlatforms = buildbot2updatePlatforms(platform) bouncerPlatform = buildbot2bouncer(platform) ftpPlatform = buildbot2ftp(platform) data['platforms'][updatePlatforms[0]] = { 'OS_BOUNCER': bouncerPlatform, 'OS_FTP': ftpPlatform } for aliasedPlatform in updatePlatforms[1:]: data['platforms'][aliasedPlatform] = { 'alias': updatePlatforms[0] } return data
def generate_data(self, appVersion, productName, version, buildNumber, partialUpdates, updateChannels, stagingServer, bouncerServer, enUSPlatforms, schemaVersion): # TODO: Multiple partial support. Probably as a part of bug 797033. previousVersion = str(max(StrictVersion(v) for v in partialUpdates)) self.name = get_release_blob_name(productName, version, buildNumber) data = { 'name': self.name, 'detailsUrl': getProductDetails(productName.lower(), appVersion), 'platforms': {}, 'fileUrls': {}, 'ftpFilenames': {}, 'bouncerProducts': {}, } assert schemaVersion in (1, 2), 'Unhandled schema version %s' % schemaVersion if schemaVersion == 1: data['appv'] = appVersion data['extv'] = appVersion elif schemaVersion == 2: data['appVersion'] = appVersion data['platformVersion'] = appVersion data['displayVersion'] = getPrettyVersion(version) for channel in updateChannels: if channel in ('betatest', 'esrtest'): dir_ = makeCandidatesDir(productName.lower(), version, buildNumber, server=stagingServer, protocol='http') data['fileUrls'][channel] = '%supdate/%%OS_FTP%%/%%LOCALE%%/%%FILENAME%%' % dir_ else: url = 'http://%s/?product=%%PRODUCT%%&os=%%OS_BOUNCER%%&lang=%%LOCALE%%' % bouncerServer data['fileUrls'][channel] = url data['ftpFilenames']['complete'] = '%s-%s.complete.mar' % (productName.lower(), version) data['ftpFilenames']['partial'] = '%s-%s-%s.partial.mar' % (productName.lower(), previousVersion, version) data['bouncerProducts']['complete'] = '%s-%s-Complete' % (productName.capitalize(), version) data['bouncerProducts']['partial'] = '%s-%s-Partial-%s' % (productName.capitalize(), version, previousVersion) for platform in enUSPlatforms: updatePlatforms = buildbot2updatePlatforms(platform) bouncerPlatform = buildbot2bouncer(platform) ftpPlatform = buildbot2ftp(platform) data['platforms'][updatePlatforms[0]] = { 'OS_BOUNCER': bouncerPlatform, 'OS_FTP': ftpPlatform } for aliasedPlatform in updatePlatforms[1:]: data['platforms'][aliasedPlatform] = { 'alias': updatePlatforms[0] } return data
def generate_data(self, appVersion, productName, version, buildNumber, updateChannels, ftpServer, bouncerServer, enUSPlatforms, **updateKwargs): details_product = productName.lower() if details_product == "devedition": details_product = "firefox" data = { 'platforms': {}, 'fileUrls': {}, 'appVersion': appVersion, 'displayVersion': getPrettyVersion(version), 'updateLine': [ { 'for': {}, 'fields': { 'detailsURL': getProductDetails(details_product, appVersion), 'type': 'minor', }, }, ] } actions = [] fileUrls = self._getFileUrls(productName, version, buildNumber, updateChannels, ftpServer, bouncerServer, **updateKwargs) if fileUrls: data.update(fileUrls) for platform in enUSPlatforms: updatePlatforms = buildbot2updatePlatforms(platform) bouncerPlatform = buildbot2bouncer(platform) ftpPlatform = buildbot2ftp(platform) data['platforms'][updatePlatforms[0]] = { 'OS_BOUNCER': bouncerPlatform, 'OS_FTP': ftpPlatform } for aliasedPlatform in updatePlatforms[1:]: data['platforms'][aliasedPlatform] = { 'alias': updatePlatforms[0] } return data
def generate_data(self, appVersion, productName, version, buildNumber, updateChannels, ftpServer, bouncerServer, enUSPlatforms, schemaVersion, openURL=None, **updateKwargs): assert schemaVersion in ( 3, 4), 'Unhandled schema version %s' % schemaVersion data = { 'detailsUrl': getProductDetails(productName.lower(), appVersion), 'platforms': {}, 'fileUrls': {}, 'appVersion': appVersion, 'platformVersion': appVersion, 'displayVersion': getPrettyVersion(version) } actions = [] if openURL: actions.append("showURL") data["openURL"] = openURL if actions: data["actions"] = " ".join(actions) fileUrls = self._getFileUrls(productName, version, buildNumber, updateChannels, ftpServer, bouncerServer, **updateKwargs) if fileUrls: data.update(fileUrls) updateData = self._get_update_data( productName, version, **updateKwargs) if updateData: data.update(updateData) for platform in enUSPlatforms: updatePlatforms = buildbot2updatePlatforms(platform) bouncerPlatform = buildbot2bouncer(platform) ftpPlatform = buildbot2ftp(platform) data['platforms'][updatePlatforms[0]] = { 'OS_BOUNCER': bouncerPlatform, 'OS_FTP': ftpPlatform } for aliasedPlatform in updatePlatforms[1:]: data['platforms'][aliasedPlatform] = { 'alias': updatePlatforms[0] } return data
def generate_data(self, appVersion, productName, version, buildNumber, updateChannels, stagingServer, bouncerServer, enUSPlatforms, schemaVersion, **updateKwargs): assert schemaVersion in (2, 3), 'Unhandled schema version %s' % schemaVersion self.name = get_release_blob_name(productName, version, buildNumber) data = { 'name': self.name, 'detailsUrl': getProductDetails(productName.lower(), appVersion), 'platforms': {}, 'fileUrls': {}, 'ftpFilenames': {}, 'bouncerProducts': {}, } data['appVersion'] = appVersion data['platformVersion'] = appVersion data['displayVersion'] = getPrettyVersion(version) for channel in updateChannels: if channel in ('betatest', 'esrtest'): dir_ = makeCandidatesDir(productName.lower(), version, buildNumber, server=stagingServer, protocol='http') data['fileUrls'][channel] = '%supdate/%%OS_FTP%%/%%LOCALE%%/%%FILENAME%%' % dir_ else: url = 'http://%s/?product=%%PRODUCT%%&os=%%OS_BOUNCER%%&lang=%%LOCALE%%' % bouncerServer data['fileUrls'][channel] = url data.update(self._get_update_data(productName, version, **updateKwargs)) for platform in enUSPlatforms: updatePlatforms = buildbot2updatePlatforms(platform) bouncerPlatform = buildbot2bouncer(platform) ftpPlatform = buildbot2ftp(platform) data['platforms'][updatePlatforms[0]] = { 'OS_BOUNCER': bouncerPlatform, 'OS_FTP': ftpPlatform } for aliasedPlatform in updatePlatforms[1:]: data['platforms'][aliasedPlatform] = { 'alias': updatePlatforms[0] } return data
def generate_data(self, appVersion, productName, version, buildNumber, updateChannels, stagingServer, bouncerServer, enUSPlatforms, schemaVersion, openURL=None, **updateKwargs): assert schemaVersion in (2, 3), 'Unhandled schema version %s' % schemaVersion self.name = get_release_blob_name(productName, version, buildNumber) data = { 'name': self.name, 'detailsUrl': getProductDetails(productName.lower(), appVersion), 'platforms': {}, 'fileUrls': {}, 'ftpFilenames': {}, 'bouncerProducts': {}, } data['appVersion'] = appVersion data['platformVersion'] = appVersion data['displayVersion'] = getPrettyVersion(version) actions = [] if openURL: actions.append("showURL") data["openURL"] = openURL if actions: data["actions"] = " ".join(actions) # XXX: This is a hack for bug 1045583. We should remove it, and always # use "candidates" for nightlyDir after the switch to Balrog is complete. if productName.lower() == "mobile": nightlyDir = "candidates" else: nightlyDir = "nightly" for channel in updateChannels: if channel in ('betatest', 'esrtest') or "localtest" in channel: dir_ = makeCandidatesDir(productName.lower(), version, buildNumber, server=stagingServer, protocol='http', nightlyDir=nightlyDir) data['fileUrls'][channel] = '%supdate/%%OS_FTP%%/%%LOCALE%%/%%FILENAME%%' % dir_ else: url = 'http://%s/?product=%%PRODUCT%%&os=%%OS_BOUNCER%%&lang=%%LOCALE%%' % bouncerServer data['fileUrls'][channel] = url # XXX: quick hack for bug 1021026. We should be using Bouncer for this # after we implement better solution talked about in comments 2 through 4 if channel == 'release': dir_ = makeCandidatesDir(productName.lower(), version, buildNumber, server='download.cdn.mozilla.net', protocol='http', nightlyDir=nightlyDir) url = '%supdate/%%OS_FTP%%/%%LOCALE%%/%%FILENAME%%' % dir_ data['fileUrls']['beta'] = url data['fileUrls']['beta-cdntest'] = url data.update(self._get_update_data(productName, version, **updateKwargs)) for platform in enUSPlatforms: updatePlatforms = buildbot2updatePlatforms(platform) bouncerPlatform = buildbot2bouncer(platform) ftpPlatform = buildbot2ftp(platform) data['platforms'][updatePlatforms[0]] = { 'OS_BOUNCER': bouncerPlatform, 'OS_FTP': ftpPlatform } for aliasedPlatform in updatePlatforms[1:]: data['platforms'][aliasedPlatform] = { 'alias': updatePlatforms[0] } return data