diff --git a/taskcluster/ci/beetmover/kind.yml b/taskcluster/ci/beetmover/kind.yml index ac770898a..4e83176c9 100644 --- a/taskcluster/ci/beetmover/kind.yml +++ b/taskcluster/ci/beetmover/kind.yml @@ -24,6 +24,7 @@ only-for-build-types: job-template: attributes: artifact_map: taskcluster/fenix_taskgraph/manifests/fenix_candidates.yml + shipping_phase: ship treeherder: job-symbol: BM bucket-scope: diff --git a/taskcluster/ci/build/kind.yml b/taskcluster/ci/build/kind.yml index e780629b5..55ef7267b 100644 --- a/taskcluster/ci/build/kind.yml +++ b/taskcluster/ci/build/kind.yml @@ -166,6 +166,7 @@ jobs: beta: attributes: release-type: beta + shipping_phase: promote include-release-version: true include-shippable-secrets: true filter-incomplete-translations: true @@ -180,6 +181,7 @@ jobs: github-name: 'fenix-mozillaonline-{version}-{abi}.apk' attributes: release-type: beta + shipping_phase: promote include-release-version: true include-shippable-secrets: true filter-incomplete-translations: true @@ -193,6 +195,7 @@ jobs: release: attributes: release-type: release + shipping_phase: promote include-release-version: true include-shippable-secrets: true filter-incomplete-translations: true @@ -207,6 +210,7 @@ jobs: github-name: 'fenix-mozillaonline-{version}-{abi}.apk' attributes: release-type: release + shipping_phase: promote include-release-version: true include-shippable-secrets: true filter-incomplete-translations: true diff --git a/taskcluster/ci/config.yml b/taskcluster/ci/config.yml index 4ff4fde1b..2d0eb2370 100644 --- a/taskcluster/ci/config.yml +++ b/taskcluster/ci/config.yml @@ -113,5 +113,7 @@ scriptworker: release-promotion: flavors: + promote: + target-tasks-method: promote ship: target-tasks-method: ship diff --git a/taskcluster/ci/github-release/kind.yml b/taskcluster/ci/github-release/kind.yml index 8d7df3941..92232d1bc 100644 --- a/taskcluster/ci/github-release/kind.yml +++ b/taskcluster/ci/github-release/kind.yml @@ -21,6 +21,8 @@ only-for-build-types: - release job-template: + attributes: + shipping_phase: ship description: Create/Update Github release and upload APKs worker-type: github worker: diff --git a/taskcluster/ci/mark-as-shipped/kind.yml b/taskcluster/ci/mark-as-shipped/kind.yml index cd6ebd2c3..d47054730 100644 --- a/taskcluster/ci/mark-as-shipped/kind.yml +++ b/taskcluster/ci/mark-as-shipped/kind.yml @@ -10,6 +10,7 @@ transforms: - taskgraph.transforms.task:transforms kind-dependencies: + - beetmover - push-apk primary-dependency: push-apk @@ -21,6 +22,8 @@ only-for-build-types: - release job-template: + attributes: + shipping_phase: ship description: Mark Fenix as shipped in ship-it worker-type: ship-it scopes: diff --git a/taskcluster/ci/push-apk/kind.yml b/taskcluster/ci/push-apk/kind.yml index 90ea975d7..e733756f7 100644 --- a/taskcluster/ci/push-apk/kind.yml +++ b/taskcluster/ci/push-apk/kind.yml @@ -22,6 +22,8 @@ only-for-build-types: - nightly job-template: + attributes: + shipping_phase: promote # APKs are sent to testing tracks description: Publish Fenix worker-type: push-apk worker: diff --git a/taskcluster/ci/version-bump/kind.yml b/taskcluster/ci/version-bump/kind.yml index c7c7a3511..7bc4ca86e 100644 --- a/taskcluster/ci/version-bump/kind.yml +++ b/taskcluster/ci/version-bump/kind.yml @@ -21,6 +21,8 @@ only-for-build-types: - release job-template: + attributes: + shipping_phase: ship description: Fenix version bump/tag worker-type: tree worker: diff --git a/taskcluster/fenix_taskgraph/parameters.py b/taskcluster/fenix_taskgraph/parameters.py index 937461e11..73ae7bedd 100644 --- a/taskcluster/fenix_taskgraph/parameters.py +++ b/taskcluster/fenix_taskgraph/parameters.py @@ -12,7 +12,7 @@ extend_parameters_schema( { Required("pull_request_number"): Any(All(int, Range(min=1)), None), Required("release_type", default=""): str, - Optional("shipping_phase"): Any("build", "ship", None), + Optional("shipping_phase"): Any("build", "promote", "ship", None), Required("version", default=""): str, Required("next_version", default=""): Any(None, str), } diff --git a/taskcluster/fenix_taskgraph/target_tasks.py b/taskcluster/fenix_taskgraph/target_tasks.py index 2b84f10cb..dba5387e3 100644 --- a/taskcluster/fenix_taskgraph/target_tasks.py +++ b/taskcluster/fenix_taskgraph/target_tasks.py @@ -20,12 +20,36 @@ def index_exists(index_path, reason=""): return False +@_target_task("promote") +def target_tasks_promote(full_task_graph, parameters, graph_config): + def filter(task, parameters): + if ( + task.attributes.get("release-type") == parameters["release_type"] + and task.attributes.get("shipping_phase") == "promote" + ): + return True + + return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)] + + @_target_task("ship") -def target_tasks_default(full_task_graph, parameters, graph_config): +def target_tasks_ship(full_task_graph, parameters, graph_config): + filtered_for_candidates = target_tasks_promote( + full_task_graph, + parameters, + graph_config, + ) - # TODO Use shipping-phase def filter(task, parameters): - return task.attributes.get("release-type", "") == parameters["release_type"] + # Include promotion tasks; these will be optimized out + if task.label in filtered_for_candidates: + return True + + if ( + task.attributes.get("release-type") == parameters["release_type"] + and task.attributes.get("shipping_phase") == "ship" + ): + return True return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)] diff --git a/taskcluster/test/params/main-repo-promote-beta.yml b/taskcluster/test/params/main-repo-promote-beta.yml new file mode 100644 index 000000000..03d8cf976 --- /dev/null +++ b/taskcluster/test/params/main-repo-promote-beta.yml @@ -0,0 +1,56 @@ +base_repository: https://github.com/mozilla-mobile/fenix +build_date: 1640308990 +build_number: 1 +do_not_optimize: [] +existing_tasks: + build-android-test-beta: JcGAMJ92R6eYCGFRFf_c5A + build-android-test-debug: Yswb54wTShCK37S8aE1kLg + build-android-test-mozillaonline: MuicYM5XS66yd1DMqN_m7g + build-android-test-nightly: eYBy9EptRpuWCCOPVLtmBw + build-beta-firebase: ctkrmSACRfW-3wbUE6SMqA + build-debug: Z-w5JkIjTQCwbJJVaqyuoQ + build-docker-image-android-build: fDd4Ru8QTqWygbEDP8f2MQ + build-docker-image-base: VS0lztwQRraFi5kf_8NHww + build-docker-image-bump: Dtyz3Jx8Qoa-aOy81LeVTg + build-docker-image-ui-tests: GtzptMkwSHGSKMTrQW8xpg + build-docker-image-visual-metrics: LzG9cHbwQkWrWc9K_-1mww + build-nightly-firebase: ewGHJXPoRiKrlGAKluR7-A + build-nightly-simulation: Yw9U9iyWSHuYbi64i0De5g + fetch-android-sdk-3859397: MA30YXOCRKiLZ05rrXSeOQ + geckoview-nightly: TVzzL2lATEaK2T542lUi8g + lint-compare-locales: b5xz-COoRoS1ZgvTEgepKQ + lint-detekt: COLcAr2fQfWLfsbri1BrEA + lint-ktlint: ChXvD8RKQdWDOaJMCd28qw + lint-lint: XiIM2XFUR72qg5F39f0CfQ + signing-android-test-beta: Lx0M3F6fR3iOqqj8HEwYTg + signing-android-test-mozillaonline: ITnjsIbARGujUVjGBkO4cA + signing-android-test-nightly: ExRmq67nRTSlkAUhV3V_9Q + signing-beta-firebase: IxvD0ajDST-kO6ejtRE7PQ + signing-nightly-firebase: F2c1KMwMRpyL44yS-LeMxw + signing-nightly-simulation: AOzAFsYuRdmc_lgmR_0sFA + test-debug: R4GUJoc3TryBaSC7bsoN_g + toolchain-linux64-android-gradle-dependencies: JJyZAqa5QJ6KIXhyVq_91Q + toolchain-linux64-android-sdk-linux-repack: eeuRa0X3Q7i5MGe1dc-eBQ + ui-test-x86-beta: QHZGQaQBS8ak_C6yL_M6eg + ui-test-x86-nightly: YimVW6nmRiex8ng4ompZ_g +filters: +- target_tasks_method +head_ref: refs/heads/releases_v96.0.0 +head_repository: https://github.com/mozilla-mobile/fenix +head_rev: e20176743eb13c51bc7a055e2bf4c552f80a2f60 +head_tag: v96.0.0-beta.5 +level: '3' +moz_build_date: '20211224012310' +next_version: 96.0.0-beta.6 +optimize_target_tasks: true +owner: 88508950+dsmithpadilla@users.noreply.github.com +project: fenix +pull_request_number: null +pushdate: 0 +pushlog_id: '0' +release_type: beta +repository_type: git +shipping_phase: promote +target_tasks_method: promote +tasks_for: action +version: 96.0.0-beta.5 diff --git a/taskcluster/test/params/main-repo-promote-release.yml b/taskcluster/test/params/main-repo-promote-release.yml new file mode 100644 index 000000000..959cd85d2 --- /dev/null +++ b/taskcluster/test/params/main-repo-promote-release.yml @@ -0,0 +1,56 @@ +base_repository: https://github.com/mozilla-mobile/fenix +build_date: 1639626597 +build_number: 1 +do_not_optimize: [] +existing_tasks: + build-android-test-beta: B4vD3TngTLW9D35-ApYfKQ + build-android-test-debug: QjtVnyJqTJe6eEmIHY50ug + build-android-test-mozillaonline: CF4tcO1jTP2rPh_Xv1xHvw + build-android-test-nightly: bVmBLzC6TR62HYEvb56EoQ + build-beta-firebase: QkYQC1H8SyuRaNZ6TSMBqA + build-debug: aPka3rH1TaOfJi9rdbXr0A + build-docker-image-android-build: OYF1kt39Q4K9n04xAn0VhA + build-docker-image-base: C2JDRKUwQy2A2dyy_RBPmg + build-docker-image-bump: YM-8YRG8S26AP9jhlX2rVA + build-docker-image-ui-tests: VLtBlgncTuyEMd1sDPuUzg + build-docker-image-visual-metrics: QYro9_lnRlyojAMggegF_Q + build-nightly-firebase: Gs-zgJzJS12p3pfHoFA1VA + build-nightly-simulation: AAwPI-HBSGOn_qWGTgCRyA + fetch-android-sdk-3859397: MA30YXOCRKiLZ05rrXSeOQ + geckoview-nightly: C9oROmpESfWu2u0JE0vkAw + lint-compare-locales: TZKl9oDaTVGPqLm5ErpKgA + lint-detekt: AlPM1LCYSJWHBT_L8tNzbA + lint-ktlint: fYRhiE7dQDiNhS3rV3Z_kg + lint-lint: ViR0bDwFQHCH9ESikK82oQ + signing-android-test-beta: CGOoDIR-TSmsxjieMOlitg + signing-android-test-mozillaonline: b-Y5L_0zSmWvnw6ujqbPAw + signing-android-test-nightly: JLG-ztp3QLumczj96aOALA + signing-beta-firebase: CrApN9xIRPGgOAAdLLVXVA + signing-nightly-firebase: HTX6Yv7wTwShhdOlKW-Fhg + signing-nightly-simulation: FDthhipBSkW6v6ScdevaWw + test-debug: HrKX6aOlTAaFzOFMe6VHgQ + toolchain-linux64-android-gradle-dependencies: dRunSF1JRbKW5mNWqWQWOg + toolchain-linux64-android-sdk-linux-repack: eeuRa0X3Q7i5MGe1dc-eBQ + ui-test-x86-beta: SBiN3LFzSqO-W67DLpepMQ + ui-test-x86-nightly: OoeIZujaSpmk-VUUKw_nkg +filters: +- target_tasks_method +head_ref: refs/heads/releases_v95.0.0 +head_repository: https://github.com/mozilla-mobile/fenix +head_rev: 2742cd554c5b0d6b93bcb7e893808cbddb79c194 +head_tag: v95.2.0 +level: '3' +moz_build_date: '20211216034957' +next_version: 95.2.1 +optimize_target_tasks: true +owner: 88508950+dsmithpadilla@users.noreply.github.com +project: fenix +pull_request_number: null +pushdate: 0 +pushlog_id: '0' +release_type: release +repository_type: git +shipping_phase: promote +target_tasks_method: promote +tasks_for: action +version: 95.2.0