diff --git a/taskcluster/ci/repackage-msix/kind.yml b/taskcluster/ci/repackage-msix/kind.yml index bf630e23b33d..5413aeb94a34 100644 --- a/taskcluster/ci/repackage-msix/kind.yml +++ b/taskcluster/ci/repackage-msix/kind.yml @@ -46,7 +46,7 @@ job-template: - repackage/base.py - repackage/win64-aarch64_sfx_stub.py - repackage/win64_signed.py - package-formats: [msix] + package-formats: [msix, msix-store] fetches: toolchain: - linux64-msix-packaging @@ -61,7 +61,36 @@ job-template: release.*: official esr.*: official default: nightly + identity-name: + by-package-format: + msix: + by-release-type: + nightly.*: MozillaFirefoxNightly + beta.*: + by-shipping-product: + devedition: MozillaFirefoxDevedition + default: MozillaFirefoxBeta + release.*: MozillaFirefox + esr.*: MozillaFirefox + default: MozillaFirefoxNightly + msix-store: + by-release-type: + nightly.*: FirefoxNightly + beta.*: + by-shipping-product: + devedition: FirefoxDevedition + default: FirefoxBeta + release.*: Firefox + esr.*: Firefox + default: FirefoxNightly publisher: - by-level: - "3": "CN=Mozilla Corporation, OU=Firefox Engineering Operations, O=Mozilla Corporation, L=Mountain View, S=California, C=US" - default: "CN=Mozilla Fake SPC" + by-package-format: + msix: + by-level: + "3": "CN=Mozilla Corporation, OU=Firefox Engineering Operations, O=Mozilla Corporation, L=Mountain View, S=California, C=US" + default: "CN=Mozilla Fake SPC" + msix-store: "CN=082E9164-EE6C-4EC8-B62C-441FAE7BEFA1" + publisher-display-name: + by-package-format: + msix: "Mozilla Corporation" + msix-store: "Mozilla" diff --git a/taskcluster/ci/repackage-shippable-l10n-msix/kind.yml b/taskcluster/ci/repackage-shippable-l10n-msix/kind.yml index 8dbeefadc023..c5ed87702426 100644 --- a/taskcluster/ci/repackage-shippable-l10n-msix/kind.yml +++ b/taskcluster/ci/repackage-shippable-l10n-msix/kind.yml @@ -48,7 +48,7 @@ job-template: - repackage/base.py - repackage/win64-aarch64_sfx_stub.py - repackage/win64_signed.py - package-formats: [msix] + package-formats: [msix, msix-store] fetches: toolchain: - linux64-msix-packaging @@ -63,7 +63,36 @@ job-template: release.*: official esr.*: official default: nightly + identity-name: + by-package-format: + msix: + by-release-type: + nightly.*: MozillaFirefoxNightly + beta.*: + by-shipping-product: + devedition: MozillaFirefoxDevedition + default: MozillaFirefoxBeta + release.*: MozillaFirefox + esr.*: MozillaFirefox + default: MozillaFirefoxNightly + msix-store: + by-release-type: + nightly.*: FirefoxNightly + beta.*: + by-shipping-product: + devedition: FirefoxDevedition + default: FirefoxBeta + release.*: Firefox + esr.*: Firefox + default: FirefoxNightly publisher: - by-level: - "3": "CN=Mozilla Corporation, OU=Firefox Engineering Operations, O=Mozilla Corporation, L=Mountain View, S=California, C=US" - default: "CN=Mozilla Fake SPC" + by-package-format: + msix: + by-level: + "3": "CN=Mozilla Corporation, OU=Firefox Engineering Operations, O=Mozilla Corporation, L=Mountain View, S=California, C=US" + default: "CN=Mozilla Fake SPC" + msix-store: "CN=082E9164-EE6C-4EC8-B62C-441FAE7BEFA1" + publisher-display-name: + by-package-format: + msix: "Mozilla Corporation" + msix-store: "Mozilla" diff --git a/taskcluster/gecko_taskgraph/transforms/repackage.py b/taskcluster/gecko_taskgraph/transforms/repackage.py index 94fa4a70f1bc..1863fa3f20e5 100644 --- a/taskcluster/gecko_taskgraph/transforms/repackage.py +++ b/taskcluster/gecko_taskgraph/transforms/repackage.py @@ -49,10 +49,36 @@ packaging_description_schema = schema.extend( ), Optional("msix"): { Optional("channel"): optionally_keyed_by( - "level", "build-platform", "release-type", "shipping-product", str + "package-format", + "level", + "build-platform", + "release-type", + "shipping-product", + str, + ), + Optional("identity-name"): optionally_keyed_by( + "package-format", + "level", + "build-platform", + "release-type", + "shipping-product", + str, ), Optional("publisher"): optionally_keyed_by( - "level", "build-platform", "release-type", "shipping-product", str + "package-format", + "level", + "build-platform", + "release-type", + "shipping-product", + str, + ), + Optional("publisher-display-name"): optionally_keyed_by( + "package-format", + "level", + "build-platform", + "release-type", + "shipping-product", + str, ), }, # All l10n jobs use mozharness @@ -121,10 +147,14 @@ PACKAGE_FORMATS = { "msix", "--channel", "{msix-channel}", - "--arch", - "{architecture}", "--publisher", "{msix-publisher}", + "--publisher-display-name", + "{msix-publisher-display-name}", + "--identity-name", + "{msix-identity-name}", + "--arch", + "{architecture}", # For langpacks. Ignored if directory does not exist. "--distribution-dir", "{fetch-dir}/distribution", @@ -137,6 +167,31 @@ PACKAGE_FORMATS = { }, "output": "target.installer.msix", }, + "msix-store": { + "args": [ + "msix", + "--channel", + "{msix-channel}", + "--publisher", + "{msix-publisher}", + "--publisher-display-name", + "{msix-publisher-display-name}", + "--identity-name", + "{msix-identity-name}", + "--arch", + "{architecture}", + # For langpacks. Ignored if directory does not exist. + "--distribution-dir", + "{fetch-dir}/distribution", + "--verbose", + "--makeappx", + "{fetch-dir}/msix-packaging/makemsix", + ], + "inputs": { + "input": "target{archive_format}", + }, + "output": "target.store.msix", + }, "dmg": { "args": ["dmg"], "inputs": { @@ -203,7 +258,9 @@ def handle_keyed_by(config, jobs): "mozharness.config", "package-formats", "msix.channel", + "msix.identity-name", "msix.publisher", + "msix.publisher-display-name", ] for job in jobs: job = copy.deepcopy(job) # don't overwrite dict values here @@ -216,6 +273,7 @@ def handle_keyed_by(config, jobs): "release-type": config.params["release_type"], "level": config.params["level"], }, + defer=["package-format"], ) yield job @@ -351,13 +409,30 @@ def make_job_description(config, jobs): "version_display": config.params["version"], "mar-channel-id": attributes["mar-channel-id"], } - # Allow us to replace args a well, but specifying things expanded in mozharness - # Without breaking .format and without allowing unknown through + # Allow us to replace `args` as well, but specifying things expanded in mozharness + # without breaking .format and without allowing unknown through. substs.update({name: f"{{{name}}}" for name in MOZHARNESS_EXPANSIONS}) - for msix_key in ("channel", "publisher"): - # Turn `msix.channel` into `msix-channel` and `msix.publisher` - # into `msix-publisher`. - value = job.get("msix", {}).get(msix_key) + + # We need to resolve values keyed by "package-format" for each format, not + # just once, so we update a temporary copy just for extracting these values. + temp_job = copy.deepcopy(job) + for msix_key in ( + "channel", + "identity-name", + "publisher", + "publisher-display-name", + ): + resolve_keyed_by( + item=temp_job, + field=f"msix.{msix_key}", + item_name="?", + **{ + "package-format": format, + }, + ) + + # Turn `msix.channel` into `msix-channel`, etc. + value = temp_job.get("msix", {}).get(msix_key) if value: substs.update( {f"msix-{msix_key}": value},