From d621630ab80eef35269c2768db609dc70c24c5f5 Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Thu, 7 Feb 2019 11:22:15 +0100 Subject: [PATCH] Bug 1519374 - Use mobile-X-b-fenix in lieu of gecko-focus --- .taskcluster.yml | 11 ++++++----- automation/taskcluster/decision_task_nightly.py | 4 ++-- automation/taskcluster/lib/tasks.py | 7 ++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.taskcluster.yml b/.taskcluster.yml index 18a0a8668..8116488b8 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -24,8 +24,8 @@ tasks: else: mobile-1-decision build_worker_type: $if: event.repository.html_url == 'https://github.com/mozilla-mobile/fenix' - then: gecko-focus - else: android-components-g + then: mobile-3-b-fenix + else: mobile-1-b-fenix in: taskId: ${decision_task_id} taskGroupId: ${decision_task_id} # Must be explicit because of Chain of Trust @@ -65,12 +65,13 @@ tasks: taskclusterProxy: true chainOfTrust: true env: - TASK_ID: ${decision_task_id} - SCHEDULER_ID: ${scheduler_id} - MOBILE_HEAD_REPOSITORY: ${repository} + BUILD_WORKER_TYPE: ${build_worker_type} MOBILE_HEAD_BRANCH: ${event.release.target_commitish} + MOBILE_HEAD_REPOSITORY: ${repository} MOBILE_HEAD_REV: ${event.release.tag_name} MOBILE_TRIGGERED_BY: ${event.sender.login} + SCHEDULER_ID: ${scheduler_id} + TASK_ID: ${decision_task_id} command: - /bin/bash - --login diff --git a/automation/taskcluster/decision_task_nightly.py b/automation/taskcluster/decision_task_nightly.py index 8ba10c758..963e5ad32 100644 --- a/automation/taskcluster/decision_task_nightly.py +++ b/automation/taskcluster/decision_task_nightly.py @@ -24,7 +24,8 @@ BUILDER = lib.tasks.TaskBuilder( task_id=TASK_ID, owner="fenix-eng-notifications@mozilla.com", source='{}/raw/{}/.taskcluster.yml'.format(GITHUB_HTTP_REPOSITORY, HEAD_REV), - scheduler_id=SCHEDULER_ID + scheduler_id=SCHEDULER_ID, + build_worker_type=os.environ.get('BUILD_WORKER_TYPE'), ) @@ -50,7 +51,6 @@ def generate_build_task(apks, is_staging): "taskclusterProxy": True }, artifacts=artifacts, - worker_type='android-components-g' if is_staging else 'gecko-focus', scopes=[ "secrets:get:{}".format(sentry_secret) ] diff --git a/automation/taskcluster/lib/tasks.py b/automation/taskcluster/lib/tasks.py index c5074a4b5..b98f70b3f 100644 --- a/automation/taskcluster/lib/tasks.py +++ b/automation/taskcluster/lib/tasks.py @@ -8,19 +8,20 @@ import taskcluster class TaskBuilder(object): - def __init__(self, task_id, owner, source, scheduler_id): + def __init__(self, task_id, owner, source, scheduler_id, build_worker_type): self.task_id = task_id self.owner = owner self.source = source self.scheduler_id = scheduler_id + self.build_worker_type = build_worker_type - def build_task(self, name, description, command, artifacts, features, worker_type, scopes=[]): + def build_task(self, name, description, command, artifacts, features, scopes=[]): created = datetime.datetime.now() expires = taskcluster.fromNow('1 year') deadline = taskcluster.fromNow('1 day') return { - "workerType": worker_type, + "workerType": self.build_worker_type, "taskGroupId": self.task_id, "schedulerId": self.scheduler_id, "expires": taskcluster.stringDate(expires),