### Running Local Cocoon Development Server (Dart) Source: https://github.com/flutter/cocoon/blob/main/README.md This command starts the local development instance of the Cocoon server. It executes a Dart script located in the `bin` directory of the `app_dart` component. Requires navigating to the `app_dart` directory and having the Dart SDK in your system's PATH. The server will listen on 0.0.0.0:8080. ```sh dart bin/local_server.dart ``` -------------------------------- ### Example Cocoon CI YAML Configuration Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md This YAML snippet provides a comprehensive example of a `.ci.yaml` file used by the Cocoon scheduler. It demonstrates how to define enabled branches, platform properties, and various types of targets including minimal, bringup, tagged, and Devicelab-specific configurations. ```yaml # /.ci.yaml # Enabled branches is a list of regexes, with the assumption that these are full line matches. # Internally, Cocoon prefixes these with $ and suffixes with ^ to enable matches. enabled_branches: - main - flutter-\d+\.\d+-candidate\.\d+ # Platform properties defines common properties shared among targets from the same platform. platform_properties: linux: properties: # os will be inherited by all Linux targets, but it can be overrided at the target level os: Linux targets: # A Target is an individual unit of work that is scheduled by Flutter infra # Target's are composed of the following properties: # name: A human readable string to uniquely identify this target. # The first word indicates the platform this test will be run on. This should match # to an existing platform under platform_properties. # recipes: LUCI recipes the target follows to run tests # https://flutter.googlesource.com/recipes/+/refs/heads/main/recipes/ # bringup: Whether this target is under active development and should not block the tree. # If true, will not run in presubmit and will not block postsubmit. # presubmit: Whether to run this target on presubmit (defaults to true). # postsubmit: Whether to run this target on postsubmit (defaults to true). # run_if: List of path regexes that can trigger this target on presubmit. # If none are passed, it will evaluare run_if_not. If both are empty the target # will always run in presubmit. # run_if_not: List of path regexes used to filter out presubmit targets. The target will # be run only if the files changed do not match any paths in this list. If run_if # is provided and not empty run_if_not will be ignored. # enabled_branches: List of strings of branches this target can run on. # This overrides the global enabled_branches. # properties: A map of string, string. Values are parsed to their closest data model. # postsubmit_properties: Properties that are only run on postsubmit. # timeout: Integer defining whole build execution time limit for all steps in minutes. # dimensions: A list of testbed dimensions which the CI determines what testbed to assign a target to. # # Minimal example: # Linux analyze will run on all presubmit and in postsubmit. - name: Linux analyze # # Bringup example: # Linux licenses will run on postsubmit, but it also passes the properties # `analyze=true` to the builder. Since `bringup=true`, presubmit is not run, # and postsubmit runs will not block the tree. - name: Linux licenses bringup: true properties: - analyze: license # # Tags example: # This test will be categorized as host only framework test. # Postsubmit runs will be passed "upload_metrics: true". - name: Linux analyze properties: tags: |- ["framework", "hostonly"] postsubmit_properties: - upload_metrics: "true" # # Devicelab example: # For tests that are located https://github.com/flutter/flutter/tree/master/dev/devicelab/bin/tasks: # 1) target name follows format of ` ` # 2) properties # 2.1) update `tags` based on hosts, devices, and tests type. These tags will be used for statistic analysis. # 2.2) a `taskname` property is required, which should match the task name # # Here is the target config for a task named: `analyzer_benchmark.dart`. - name: Linux_android analyzer_benchmark recipe: devicelab/devicelab_drone presubmit: false properties: tags: |- ["devicelab", "android", "linux"] task_name: analyzer_benchmark ``` -------------------------------- ### Promoting device_doctor to Staging (Mac, Example) (Bash) Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/device_doctor/README.md This is a concrete example demonstrating how to use the `cipd set-ref` command to promote a specific package version to the 'staging' reference for the `mac-amd64` architecture using a sample package ID. ```bash cipd set-ref flutter/device_doctor/mac-amd64 -ref staging -version IQgKjNstWbFhUuMVp898zZoPKRd66KLRKuiY88XYQXAC ``` -------------------------------- ### Run and Tail Logs of Local Docker Container Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Starts a detached Docker container from the 'local' image, maps port 8080, and then streams the logs of the running container to the console for real-time monitoring. ```sh $ container_id="$(docker run -d -p 8080:8080 local)" && \ clear && \ printf '\e[3J' && \ docker logs $container_id -f ``` -------------------------------- ### Deploying Cocoon Server Test Version to GCP (Dart) Source: https://github.com/flutter/cocoon/blob/main/README.md Use this command to build and deploy a test version of the Cocoon server application to Google App Engine. It runs a Dart deployment script and requires specifying the target `--project` and `--version`. Requires being in the `app_dart` directory, having the Dart SDK and Google Cloud SDK installed and configured. Optional flags like `--profile` and `--ignore-version-check` are available. ```sh dart dev/deploy.dart --project {PROJECT} --version {VERSION} ``` -------------------------------- ### Run Local Dart Development Server Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Starts the Cocoon backend server locally using a specific Dart script. The server will listen for requests, typically on port 8080, for development and testing purposes. ```sh dart run tool/local_server.dart ``` -------------------------------- ### Activate and Run Protobuf Codegen Tool Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Activates the `protofu` Dart global tool and then executes it. This tool is used specifically for generating Dart code from Protocol Buffer definitions. ```shell dart pub global activate protofu ``` ```shell protofu ``` -------------------------------- ### Configure Flutter and Dart PATH Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Sets up the environment variables to include the Flutter and Dart SDK binaries in the system's PATH. This is necessary to execute Flutter and Dart commands from the terminal. ```sh export PATH="$PATH":"path/to/flutter/bin/" flutter upgrade flutter pub get export PATH="$PATH":"path/to/flutter/bin/cache/dart-sdk/bin/" ``` -------------------------------- ### Build Local Docker Image Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Builds a Docker image for the Cocoon backend using the Dockerfile in the current directory. The image is tagged as 'local' for easy reference. ```sh $ docker build -t local . ``` -------------------------------- ### Initialize Google Cloud CLI Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Initializes the Google Cloud SDK and authenticates the user with application-default credentials. This is a prerequisite for interacting with Google Cloud services like App Engine and Datastore. ```sh gcloud auth application-default login ``` ```sh gcloud init ``` -------------------------------- ### Run Dart Tests Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Executes the test suite for the Dart backend code to ensure functionality and prevent regressions. This command runs all tests found in the project. ```sh $ dart test ``` -------------------------------- ### Format Dart Code Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Applies standard Dart formatting to all source files in the current directory. This ensures code consistency and readability after code generation or manual changes. ```shell dart format . ``` -------------------------------- ### Manually Deploy to App Engine with Dart Script Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Executes a Dart deployment script that builds the Flutter project, copies necessary files, and uses the Google Cloud CLI to deploy a specific version of the backend to App Engine for a given project ID. ```sh $ dart dev/deploy.dart --version version-$(git rev-parse --short HEAD) --project flutter-dashboard ``` ```sh $ dart dev/deploy.dart --help ``` -------------------------------- ### Generate Cloud Datastore Indexes Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Creates or updates the indexes defined in `index.yaml` for the Google Cloud Datastore. This is required for efficient querying of data in the production or development Datastore environment. ```sh $ gcloud datastore indexes create index.yaml ``` -------------------------------- ### Running Flutter Dashboard with Web Server (sh) Source: https://github.com/flutter/cocoon/blob/main/dashboard/README.md Starts a local web server for the Flutter Dashboard application without automatically launching a browser. The application will be accessible via a browser pointed at localhost:8080, with port 8080 needed for authentication. ```sh flutter run -d web-server --web-port=8080 ``` -------------------------------- ### Executing codesign with dart run - Bash Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/codesign/README.md Provides an alternative method to run the codesign tool directly using the 'dart run' command, which is useful if you have the Dart SDK installed and prefer not to build a standalone binary. This command executes the main Dart script for the tool and accepts additional command-line flags as arguments. ```bash dart run bin/codesign.dart -- ``` -------------------------------- ### Remove Unused Protobuf Generated Files Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Uses the `find` command with regular expressions to locate and delete specific Protocol Buffer generated files (pbjson and pbserver) that may no longer be needed. ```shell find . -regex '.*\.\(pbjson\|pbserver\)\.dart' -delete ``` ```shell find -E . -regex '.*(pbserver|pbjson)\.dart' -delete ``` -------------------------------- ### Stop Local Docker Container Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Finds the container ID of the running 'local' Docker container and sends a stop signal to gracefully shut it down. ```sh $ docker container ls|grep local|tr -s ' '|cut -d' ' -f1|xargs docker container stop ``` -------------------------------- ### Set Google Cloud Project Environment Variable Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Defines the GOOGLE_CLOUD_PROJECT environment variable, specifying the target Google Cloud project for gcloud commands and potentially other tools. ```sh export GOOGLE_CLOUD_PROJECT=flutter-dashboard ``` -------------------------------- ### Remove Local Docker Image Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Finds the image ID of the 'local' Docker image and forcibly removes it from the system. ```sh $ docker images|grep local|tr -s ' '|cut -d' ' -f3|xargs docker rmi -f ``` -------------------------------- ### Configuring contexts Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'contexts' property as a list using YAML's multiline block scalar (>-). These contexts guide recipes in using the Python contextlib.ExitStack to initialize resources, such as virtual devices, required for tests. ```YAML contexts: >- [ "android_virtual_device" ] ``` -------------------------------- ### Run Dart Build Runner for JSON Codegen Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Invokes the Dart build_runner tool to generate code for JSON serialization, typically based on annotations in source files. This step is required to update serialization code after model changes. ```sh $ dart run build_runner build ``` -------------------------------- ### Configuring External Test Target YAML in Cocoon Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md This YAML snippet provides an example of configuring an external test target within the `.ci.yaml` file. It sets `name` for dashboard display, `bringup: true` and `presubmit: false` to prevent it from blocking the tree, and specifies the `scheduler` name which must match the configuration in `scheduler.proto`. This allows integrating tests run by external systems into the Cocoon dashboard. ```YAML # .ci.yaml # Name is an arbitrary string that will show on the build dashboard - name: my_external_test_a # External tests should not block the tree bringup: true presubmit: false # Scheduler must match what was added to scheduler.proto (any unique name works) scheduler: my_external_location ``` -------------------------------- ### SSH into Docker Container Source: https://github.com/flutter/cocoon/blob/main/app_dart/README.md Executes a bash shell inside a running Docker container, allowing interactive command-line access to the container's environment. Replace with the actual container name or ID. ```sh $ docker exec -it /bin/bash ``` -------------------------------- ### Creating codesign CIPD Package - Bash Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/codesign/README.md Demonstrates how to manually create and tag a CIPD package for the codesign tool using the `cipd create` command. This process requires a pre-built executable binary located in the 'build' folder. The command uploads the binary to CIPD and tags it with specific release or staging references, including a timestamped revision. ```bash cipd create -in build \ -name flutter/codesign/-amd64 \ -ref \ -tag sha_timestamp:_ ``` -------------------------------- ### Creating CIPD Package for device_doctor (Bash) Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/device_doctor/README.md This command demonstrates how to build and publish the compiled device_doctor binary as a CIPD package. It specifies the input directory (`build`), the package name including the OS and architecture, a reference (`ref`) for the package (e.g., release, staging), and a unique tag based on the commit SHA and timestamp. ```bash cipd create -in build \ -name flutter/device_doctor/-amd64 \ -ref \ -tag sha_timestamp:_ ``` -------------------------------- ### Executing codesign Binary - Bash Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/codesign/README.md Illustrates how to run the AOT-compiled 'codesign' executable binary from the 'build' directory. It shows the command structure and required flags for specifying input and output zip files, certificate names, team IDs, App Store IDs, and app-specific passwords. The `--[no-]dryrun` flag controls whether actual signing operations occur. ```bash ./codesign --[no-]dryrun \ --codesign-cert-name="FLUTTER.IO LLC" \ --codesign-team-id-file-path=/a/b/c.txt \ --codesign-appstore-id-file-path=/a/b/b.txt \ --app-specific-password-file-path=/a/b/a.txt \ --input-zip-file-path=/a/input.zip \ --output-zip-file-path=/b/output.zip ``` -------------------------------- ### Creating Doxygen CIPD Package (Bash) Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/doxygen/README.md This Bash command is used to create and push a Doxygen package to the CIPD repository after a manual build. It packages the contents of the 'build' directory, assigns a name based on the operating system, sets a reference ('release' or 'staging'), and tags it with a unique identifier derived from the commit revision and timestamp. ```bash cipd create -in build \ -name flutter/doxygen/-amd64 \ -ref \ -tag sha_timestamp:_ ``` -------------------------------- ### Running Flutter Dashboard Tests (sh) Source: https://github.com/flutter/cocoon/blob/main/dashboard/README.md Executes the standard test suite for the Flutter Dashboard project. Most tests can be run using this command locally. ```sh flutter test ``` -------------------------------- ### Configuring New Target YAML for Migration in Cocoon Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md This YAML snippet demonstrates how to add a new target configuration when migrating a target to a different platform (e.g., from devicelab to host-only). It includes `bringup: true` to mark it as a new target being brought up, optional `dependencies`, and `tags` specifying its new characteristics (`hostonly`). This is part of a temporary configuration during the migration process. ```YAML - name: Linux web_size__compile_test bringup: true # new target properties: dependencies: >- # optional [ {"dependency": "new-dependency", "version": "new-dependency-version"} ] tags: > ["devicelab", "hostonly", "linux"] ``` -------------------------------- ### Configuring Existing Target YAML in Cocoon Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md This YAML snippet shows the configuration for an existing target named `Linux_android web_size__compile_test`. It includes properties like `tags` which are used for infrastructure metrics analysis and specify characteristics like `devicelab`, `android`, and `linux`. It represents a target running on a devicelab bot before migration. ```YAML - name: Linux_android web_size__compile_test properties: tags: > ["devicelab", "android", "linux"] ``` -------------------------------- ### Promoting device_doctor Version to Staging (Bash) Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/device_doctor/README.md This CIPD command promotes a specific version of the device_doctor package to the 'staging' reference for a given OS and architecture. The version is identified by its unique package ID. ```bash cipd set-ref flutter/device_doctor/- -ref staging -version ``` -------------------------------- ### Using Local Dependency Path in Dart pubspec.yaml Source: https://github.com/flutter/cocoon/blob/main/packages/buildbucket-dart/README.md This code snippet demonstrates how to configure a Dart project's pubspec.yaml file to use a local path for the 'buildbucket-dart' package dependency. This allows developers to test changes made to the package locally without publishing a new version. The 'path' key specifies the file system location of the package. ```Dart dependencies: buildbucket-dart: path: /your/path/to/packages/buildbucket-dart ``` -------------------------------- ### Configuring Cocoon CI Build for CIPD Package (YAML) Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/README.md This YAML snippet shows how to configure a job in the Cocoon `.ci.yaml` file to automatically build and upload a CIPd package. It specifies the recipe, the build script location, the target CIPD package name, and uses `bringup: true` for initial validation in a staging environment. ```YAML - name: Mac recipe: cocoon/cipd bringup: true properties: script: cipd_packages//tool/build.sh cipd_name: flutter//mac-amd64 # Use mac-arm64 for arm64 version. device_type: none runIf: - cipd_packages//** - .ci.yaml ``` -------------------------------- ### Running device_doctor with Action and Device OS (Bash) Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/device_doctor/README.md This command shows the basic syntax for executing the compiled device_doctor binary. It requires specifying an action to perform (`healthcheck`, `recovery`, or `properties`) and the operating system of the connected device (`android` or `ios`). ```bash /path/to/device_doctor --action --device-os ``` -------------------------------- ### Promoting device_doctor Version to Release (Bash) Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/device_doctor/README.md This CIPD command promotes a specific version of the device_doctor package to the 'release' reference for a given OS and architecture. The version is identified by its unique package ID. ```bash cipd set-ref flutter/device_doctor/- -ref release -version ``` -------------------------------- ### Standard File Header Comment Source: https://github.com/flutter/cocoon/blob/main/CONTRIBUTING.md This code snippet represents the mandatory comment block that must be placed at the beginning of every source code file within the Flutter Cocoon project. It serves as a legal notice, specifying copyright information, directing to authorship details, and stating the governing open-source license (BSD-style). Including this header is a requirement for contributions. ```Source File Header // Copyright (c) 2016, the Flutter project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. ``` -------------------------------- ### Running Golden Update Script Workaround (sh) Source: https://github.com/flutter/cocoon/blob/main/dashboard/README.md Executes a specific Dart script from the command line to update golden files using images downloaded from a failing CI run's stdout log. This serves as a workaround when a Linux host is unavailable for the standard golden update command and requires the URL of the CI log. ```sh dart run tool/update_goldens_from_luci.dart "" ``` -------------------------------- ### Defining Target and Overriding Dependency Version in ci.yaml YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Demonstrates how to define a target named 'Linux Host Engine' in the ci.yaml configuration file. It shows how to set the 'build_host' property and override the version for the 'open_jdk' dependency within the target's properties. ```YAML - name: Linux Host Engine recipe: engine properties: build_host: "true" dependencies: >- [ {"dependency": "open_jdk", "version": "11"} ] timeout: 60 ``` -------------------------------- ### Configuring os Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'os' property to 'Linux'. This property specifies the required machine operating system for the target and is automatically populated to CI builder dimensions to select the testbed. ```YAML os: Linux ``` -------------------------------- ### Setting CIPD Package Reference (Shell) Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/README.md This shell command uses the `cipd` tool to set a symbolic reference (like `stable` or `dev`) to a specific version (InstanceID) of a CIPD package. This allows CI recipes to depend on a stable reference instead of a volatile InstanceID. ```Shell cipd set-ref flutter/PackageName/mac-amd64 -ref Reference -version InstanceID ``` -------------------------------- ### Configuring GitHub Action: No Response Workflow Source: https://github.com/flutter/cocoon/blob/main/gh_actions/third_party/no-response/README.md This YAML snippet provides a basic configuration for a GitHub Actions workflow using the `lee-dohm/no-response` action. The workflow is triggered by the creation of issue comments and runs on a schedule (every hour, 5 minutes past the hour). It uses the default GitHub token for authentication. ```yaml name: No Response # Both `issue_comment` and `scheduled` event types are required for this Action # to work properly. on: issue_comment: types: [created] schedule: # Schedule for five minutes after the hour, every hour - cron: '5 * * * *' jobs: noResponse: runs-on: ubuntu-latest steps: - uses: lee-dohm/no-response@v0.5.0 with: token: ${{ github.token }} ``` -------------------------------- ### Running Flutter Dashboard in Chrome (sh) Source: https://github.com/flutter/cocoon/blob/main/dashboard/README.md Launches the Flutter Dashboard application locally, targeting the Chrome browser. Specifies port 8080, which is required for authentication to function correctly. ```sh flutter run -d chrome --web-port=8080 ``` -------------------------------- ### Setting CIPD Package Tag (Shell) Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/README.md This shell command uses the `cipd` tool to set a tag (a specific version identifier, like `version_1_1_1`) to a specific version (InstanceID) of a CIPD package. This is used to define specific versions tied to particular instances. ```Shell cipd set-tag flutter/PackageName/mac-amd64 -tag Tag -version InstanceID ``` -------------------------------- ### Updating Flutter Dashboard Golden Tests (sh) Source: https://github.com/flutter/cocoon/blob/main/dashboard/README.md Runs the test suite with a flag to update golden (screenshot comparison) test files instead of comparing them. Note that this command requires a Linux host for compatibility reasons. ```sh flutter test --update-goldens ``` -------------------------------- ### Configuring $flutter/osx_sdk Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the '$flutter/osx_sdk' property as a map using YAML's multiline block scalar (>-). This configures Xcode SDK and runtime versions required for macOS-based builds and tests. ```YAML $flutter/osx_sdk : >- { "sdk_version": "14e222b", "runtime_versions": [ "ios-16-4_14e222b", "ios-16-2_14c18" ] } ``` -------------------------------- ### Configuring cores Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'cores' property to '8'. This property specifies the number of machine cores the target requires and is automatically populated to CI builder dimensions to determine the appropriate testbed. ```YAML cores: "8" ``` -------------------------------- ### Configuring gclient_variables Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'gclient_variables' property as a map using YAML's multiline block scalar (>-). These variables are passed to recipes when synchronizing sources using gclient. ```YAML gclient_variables: >- { "download_android_deps": "true" } ``` -------------------------------- ### Configuring dependencies Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'dependencies' property as a list of objects using YAML's multiline block scalar (>-). Each object specifies a dependency name and optionally a version, used by the flutter_deps recipe module to generate Swarming caches. ```YAML dependencies: >- [ {"dependency": "android_sdk"}, {"dependency": "chrome_and_driver", "version": "latest"}, {"dependency": "clang"}, {"dependency": "goldctl"} ] ``` -------------------------------- ### Configuring add_recipes_cq Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'add_recipes_cq' property to true, indicating that this target should be included in the flutter/recipes Continuous Quality (CQ) process. This ensures changes to recipes are validated against this target before landing. ```YAML add_recipes_cq: "true" ``` -------------------------------- ### Configuring drone_dimensions Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'drone_dimensions' property as a list using YAML's multiline folded scalar (>). This specifies testbed dimensions for subbuild drones triggered from an orchestrator target, automatically populating CI dimensions for the subbuild. ```YAML drone_dimensions: > ["device_type=none", "os=Linux"] ``` -------------------------------- ### Configuring config_name Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'config_name' property to 'linux_benchmarks'. This property is used by Engine V2 recipes and maps to a specific configuration file under 'ci/builders' in the engine repository. It is not needed for targets not using Engine V2 recipes. ```YAML config_name: linux_benchmarks ``` -------------------------------- ### Configuring release_build Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'release_build' property to true, indicating that this target is required to run as part of the Engine release process, typically triggered by the release_builder.py recipe. ```YAML release_build: "true" ``` -------------------------------- ### Configuring tags Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'tags' property as a list using YAML's multiline folded scalar (>). These tags are currently used in the flutter/flutter repository for purposes like TESTOWNERSHIP and tracking test flakiness. ```YAML tags: > ["devicelab","hostonly"] ``` -------------------------------- ### Configuring cache_paths Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'cache_paths' property as a list of paths using YAML's multiline block scalar (>-). These paths specify Engine checkout source locations that should be automatically saved to CAS to improve checkout speed when caches are not available on bots. ```YAML cache_paths: >- [ "builder", "git" ] ``` -------------------------------- ### Configuring clobber Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'clobber' property to true, indicating that the Engine source code cache should be cleaned before the build runs. This is typically used to ensure a clean state. ```YAML clobber: "true" ``` -------------------------------- ### Configuring test_timeout_secs Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'test_timeout_secs' property to '2700'. This specifies the timeout duration in seconds for an individual test step within the target's execution. ```YAML test_timeout_secs: "2700" ``` -------------------------------- ### Declaring CIPD Package Dependency in Cocoon CI (YAML) Source: https://github.com/flutter/cocoon/blob/main/cipd_packages/README.md This YAML snippet demonstrates how to add a dependency on a CIPD package within a Cocoon CI configuration, typically at the platform or target level. It uses the `dependencies` key with a list of dependency objects, specifying the package name (`chrome_and_driver`) and the `Reference` (e.g., `stable`) to use. ```YAML dependencies: >- [ {"dependency": "chrome_and_driver", "version": "Reference"}, ] ``` -------------------------------- ### Configuring shard Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'shard' property to 'web_tests'. This property specifies the name of the shard when using sharding with the test.dart test runner. ```YAML shard: web_tests ``` -------------------------------- ### Configuring subshards Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'subshards' property as a list using YAML's multiline block scalar (>-). This specifies the specific sub-shards to run within a sharded target when using the test.dart test runner. ```YAML subshards: >- ["0", "1", "2", "3", "4", "5", "6", "7_last"] ``` -------------------------------- ### Configuring ignore_cache_paths Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'ignore_cache_paths' property as a list using YAML's multiline block scalar (>-). These paths specify Engine checkout source locations that should be excluded when saving to CAS. ```YAML ignore_cache_paths: >- [ "buibuilder/src/flutter/prebuilts/SDKs", "builder/src/flutter/prebuilts/Library"lder" ] ``` -------------------------------- ### Configuring cache_name Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'cache_name' property to 'builder'. This property identifies the specific second-layer Engine source cache to be used, maintained by the flutter/infra team. ```YAML cache_name: "builder" ``` -------------------------------- ### Configuring presubmit_max_attempts Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'presubmit_max_attempts' property to '3'. This property controls the maximum number of times the target will be automatically retried in presubmit if it fails. ```YAML presubmit_max_attempts: "3" ``` -------------------------------- ### Configuring device_type Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'device_type' property to 'msm8952'. This property specifies the type of phone device required for the target and is auto-populated to CI builder dimensions to select the testbed. ```YAML device_type: "msm8952" ``` -------------------------------- ### Configuring no_goma Property in YAML Source: https://github.com/flutter/cocoon/blob/main/CI_YAML.md Sets the 'no_goma' property to true, indicating that Goma should not be used when building artifacts for this target. ```YAML no_goma: "true" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.