Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit cd8be8b

Browse files
authored
Use magic envs to pass commit and temp folder. (#46015)
The fuchsia scripts rely on paths and the commit version being passed as parameters. This changes pass those values using special environment variables. Bug: flutter/flutter#126461 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent 5a924a9 commit cd8be8b

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

ci/builders/README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,25 @@ A configuration file defines a top-level builder that will show up as a column
105105
in the
106106
[Flutter Dashboard](https://flutter-dashboard.appspot.com/#/build?repo=engine&branch=master).
107107

108+
109+
### Magic variables
110+
111+
Magic variables are special environment variables that can be used as parameters
112+
for generators and test commands in the local and global contexts.
113+
114+
Magic environment variables have the following limitations:
115+
only `${FLUTTER_LOGS_DIR}` is currently supported and it needs to be used
116+
alone within the parameter string(e.g. `["${FLUTTER_LOGS_DIR}"]` is OK
117+
but `["path=${FLUTTER_LOGS_DIR}"]` is not).
118+
119+
The current list of supported magic variables is:
120+
121+
* `${FLUTTER_LOGS_DIR}` - translated to the path of the temporary
122+
folder where logs are being placed.
123+
* `${LUCI_WORKDIR}` - translated to the LUCI chroot working directory.
124+
* `${LUCI_CLEANUP}` - translated to the LUCI chroot temp directory.
125+
* `${REVISION}` - translated to the engine commit under test.
126+
108127
### Build
109128

110129
A build is a dictionary with a gn command, a ninja command, zero or more
@@ -299,10 +318,7 @@ permissions to run in the target platform.
299318
* **name** - the name of the step running the script.
300319
* **parameters** - flags or parameters passed to the script. Parameters
301320
accept magic environment variables(placeholders replaced before executing
302-
the test). Magic environment variables have the following limitations:
303-
only `${FLUTTER_LOGS_DIR}` is currently supported and it needs to be used
304-
alone within the parameter string(e.g. `["${FLUTTER_LOGS_DIR}"]` is OK
305-
but `["path=${FLUTTER_LOGS_DIR}"]` is not).
321+
the test).
306322
* **Script** - the path to the script to execute relative to the checkout
307323
directory.
308324
* **contexts** - a list of available contexts to add to the text execution step.

ci/builders/linux_fuchsia.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@
152152
"name": "Upload fuchsia artifacts",
153153
"parameters": [
154154
"--engine-version",
155-
"HEAD",
156-
"--skip-build"
155+
"${REVISION}",
156+
"--skip-build",
157+
"--upload"
157158
],
158159
"script": "flutter/tools/fuchsia/build_fuchsia_artifacts.py",
159160
"language": "python3"
@@ -166,7 +167,7 @@
166167
"--target-arch",
167168
"arm64",
168169
"--out-dir",
169-
"/b/s/w/ir/x/w/recipe_cleanup/tmppqs4ecj7",
170+
"${LUCI_CLEANUP}",
170171
"--symbol-dirs",
171172
"out/fuchsia_debug_arm64/.build-id",
172173
"out/fuchsia_profile_arm64/.build-id",
@@ -183,7 +184,7 @@
183184
"--target-arch",
184185
"x64",
185186
"--out-dir",
186-
"/b/s/w/ir/x/w/recipe_cleanup/tmppqs4ecj7",
187+
"${LUCI_CLEANUP}",
187188
"--symbol-dirs",
188189
"out/fuchsia_debug_x64/.build-id",
189190
"out/fuchsia_profile_x64/.build-id",

0 commit comments

Comments
 (0)