Publishes nightly to separate nightly app (#3740)
parent
f375eac6bd
commit
14625097f4
|
@ -137,43 +137,6 @@ def release(channel, is_staging, version_name):
|
||||||
return (build_tasks, signing_tasks, push_tasks)
|
return (build_tasks, signing_tasks, push_tasks)
|
||||||
|
|
||||||
|
|
||||||
def nightly_to_production_app(is_staging, version_name):
|
|
||||||
# Since the Fenix nightly was launched, we've pushed it to the production app "org.mozilla.fenix" on the
|
|
||||||
# "nightly" track. We're moving towards having each channel be published to its own app, but we need to
|
|
||||||
# keep updating this "backwards-compatible" nightly for a while yet
|
|
||||||
channel = 'nightly'
|
|
||||||
variants = get_variants_for_build_type(channel)
|
|
||||||
architectures = [variant.abi for variant in variants]
|
|
||||||
apk_paths = ["public/target.{}.apk".format(arch) for arch in architectures]
|
|
||||||
|
|
||||||
build_tasks = {}
|
|
||||||
signing_tasks = {}
|
|
||||||
push_tasks = {}
|
|
||||||
|
|
||||||
build_task_id = taskcluster.slugId()
|
|
||||||
build_tasks[build_task_id] = BUILDER.craft_assemble_release_task(architectures, channel, is_staging, version_name)
|
|
||||||
|
|
||||||
signing_task_id = taskcluster.slugId()
|
|
||||||
signing_tasks[signing_task_id] = BUILDER.craft_release_signing_task(
|
|
||||||
build_task_id,
|
|
||||||
apk_paths=apk_paths,
|
|
||||||
channel='production', # Since we're publishing to the "production" app, we need to sign for production
|
|
||||||
index_channel=channel,
|
|
||||||
is_staging=is_staging,
|
|
||||||
)
|
|
||||||
|
|
||||||
push_task_id = taskcluster.slugId()
|
|
||||||
push_tasks[push_task_id] = BUILDER.craft_push_task(
|
|
||||||
signing_task_id,
|
|
||||||
apks=apk_paths,
|
|
||||||
channel='production', # We're publishing to the "production" app on the "nightly" track
|
|
||||||
override_google_play_track='nightly',
|
|
||||||
is_staging=is_staging,
|
|
||||||
)
|
|
||||||
|
|
||||||
return (build_tasks, signing_tasks, push_tasks)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='Creates and submit a graph of tasks on Taskcluster.'
|
description='Creates and submit a graph of tasks on Taskcluster.'
|
||||||
|
@ -205,7 +168,7 @@ if __name__ == "__main__":
|
||||||
ordered_groups_of_tasks = raptor(result.staging)
|
ordered_groups_of_tasks = raptor(result.staging)
|
||||||
elif command == 'nightly':
|
elif command == 'nightly':
|
||||||
formatted_date = datetime.datetime.now().strftime('%y%V')
|
formatted_date = datetime.datetime.now().strftime('%y%V')
|
||||||
ordered_groups_of_tasks = nightly_to_production_app(result.staging, '1.0.{}'.format(formatted_date))
|
ordered_groups_of_tasks = release('nightly', result.staging, '1.0.{}'.format(formatted_date))
|
||||||
elif command == 'github-release':
|
elif command == 'github-release':
|
||||||
version = result.tag[1:] # remove prefixed "v"
|
version = result.tag[1:] # remove prefixed "v"
|
||||||
beta_semver = re.compile(r'^v\d+\.\d+\.\d+-beta\.\d+$')
|
beta_semver = re.compile(r'^v\d+\.\d+\.\d+-beta\.\d+$')
|
||||||
|
|
|
@ -423,19 +423,18 @@ class TaskBuilder(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
def craft_release_signing_task(
|
def craft_release_signing_task(
|
||||||
self, build_task_id, apk_paths, channel, is_staging, index_channel=None
|
self, build_task_id, apk_paths, channel, is_staging
|
||||||
):
|
):
|
||||||
index_channel = index_channel or channel
|
|
||||||
staging_prefix = '.staging' if is_staging else ''
|
staging_prefix = '.staging' if is_staging else ''
|
||||||
|
|
||||||
routes = [
|
routes = [
|
||||||
"index.project.mobile.fenix.v2{}.{}.{}.{}.{}.latest".format(
|
"index.project.mobile.fenix.v2{}.{}.{}.{}.{}.latest".format(
|
||||||
staging_prefix, index_channel, self.date.year, self.date.month, self.date.day
|
staging_prefix, channel, self.date.year, self.date.month, self.date.day
|
||||||
),
|
),
|
||||||
"index.project.mobile.fenix.v2{}.{}.{}.{}.{}.revision.{}".format(
|
"index.project.mobile.fenix.v2{}.{}.{}.{}.{}.revision.{}".format(
|
||||||
staging_prefix, index_channel, self.date.year, self.date.month, self.date.day, self.commit
|
staging_prefix, channel, self.date.year, self.date.month, self.date.day, self.commit
|
||||||
),
|
),
|
||||||
"index.project.mobile.fenix.v2{}.{}.latest".format(staging_prefix, index_channel),
|
"index.project.mobile.fenix.v2{}.{}.latest".format(staging_prefix, channel),
|
||||||
]
|
]
|
||||||
|
|
||||||
capitalized_channel = upper_case_first_letter(channel)
|
capitalized_channel = upper_case_first_letter(channel)
|
||||||
|
|
Loading…
Reference in New Issue