Prepare fuchsia script to coexist with v1 and v2 of fuchsia builders. (flutter/engine#46126)

Prepares fuchsia scripts to work correctly when both v1 and v2 of the fuchsia build are running in their respective environments.

Bug: https://github.com/flutter/flutter/issues/126461
Bug: https://github.com/flutter/flutter/issues/135189

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
godofredoc
2023-09-25 18:27:26 -07:00
committed by GitHub
parent 302f0f7355
commit 421f68e13a
5 changed files with 25 additions and 3 deletions

View File

@@ -161,6 +161,7 @@ targets:
- name: Linux Fuchsia
recipe: engine/engine
properties:
add_recipes_cq: "true"
build_fuchsia: "true"
fuchsia_ctl_version: version:0.0.27
# ensure files from pre-production Fuchsia SDK tests are purged from cache

View File

@@ -122,7 +122,8 @@ The current list of supported magic variables is:
folder where logs are being placed.
* `${LUCI_WORKDIR}` - translated to the LUCI chroot working directory.
* `${LUCI_CLEANUP}` - translated to the LUCI chroot temp directory.
* `${REVISION}` - translated to the engine commit under test.
* `${REVISION}` - translated to the engine commit in postsubmit. In presubmit
it is translated to an empty string.
### Build

View File

@@ -164,6 +164,7 @@
"parameters": [
"--engine-version",
"${REVISION}",
"--upload",
"--target-arch",
"arm64",
"--out-dir",
@@ -181,6 +182,7 @@
"parameters": [
"--engine-version",
"${REVISION}",
"--upload",
"--target-arch",
"x64",
"--out-dir",

View File

@@ -495,9 +495,17 @@ def main():
if args.copy_unoptimized_debug_artifacts and runtime_mode == 'debug' and optimized:
CopyBuildToBucket(runtime_mode, arch, not optimized, product)
# Set revision to HEAD if empty and remove upload. This is to support
# presubmit workflows.
should_upload = args.upload
engine_version = args.engine_version
if not engine_version:
engine_version = 'HEAD'
should_upload = False
# Create and optionally upload CIPD package
if args.cipd_dry_run or args.upload:
ProcessCIPDPackage(args.upload, args.engine_version)
ProcessCIPDPackage(should_upload, engine_version)
return 0

View File

@@ -214,7 +214,17 @@ def main():
arch = args.target_arch
cipd_def = WriteCIPDDefinition(arch, out_dir, internal_symbol_dirs)
ProcessCIPDPackage(args.upload, cipd_def, args.engine_version, out_dir, arch)
# Set revision to HEAD if empty and remove upload. This is to support
# presubmit workflows. An empty engine_version means this script is running
# on presubmit.
should_upload = args.upload
engine_version = args.engine_version
if not engine_version:
engine_version = 'HEAD'
should_upload = False
ProcessCIPDPackage(should_upload, cipd_def, engine_version, out_dir, arch)
return 0