• Stars
    star
    182
  • Rank 211,154 (Top 5 %)
  • Language
    Dart
  • License
    BSD 3-Clause "New...
  • Created over 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Flutter's build coordinator and aggregator

Flutter

OpenSSF Scorecard SLSA 3

Cocoon is a Dart App Engine custom runtime (backend) with a frontend of Flutter apps (build and repository dashboard). Cocoon coordinates and aggregates the results of flutter/flutter builds.

It is not designed to help developers build Flutter apps.

Cocoon is not a Google product.

Using Cocoon

Forcing a refresh from GitHub

The server is driven by commits made to https://github.com/flutter/flutter repo. It periodically syncs new commits. If you need to manually force a refresh, query https://flutter-dashboard.appspot.com/api/refresh-github-commits.

You will need to be authenticated with Cocoon to do this.

Developing Cocoon

Cocoon has several components:

  • A server, which coordinates everything. This is a Dart App Engine application. If you have never used that before, you may want to peruse the samples for Dart App Engine. The server is found in app_dart.

  • A Flutter app (generally used as a Web app) for the build dashboards. The dashboard is found in dashboard.

Cocoon creates a checklist for each Flutter commit. A checklist is made of multiple tasks. Tasks are performed by LUCI bots.

Getting started

First, set up a Flutter development environment. This will, as a side-effect, provide you with a Dart SDK. Your life will be easier if you add that (.../flutter/bin/cache/dart-sdk/bin/) to your path.

To update the production server, you will need the Google Cloud SDK. Since there is no Dart SDK, we just use the command line tools.

Developing the server

All the commands in this section assume that you are in the app_dart/ directory.

Running a local dev server

This is for legacy users who were granted old security keys. Due to overground, this is no longer supported.

$ export GOOGLE_CLOUD_PROJECT=flutter-dashboard-dev # or flutter-dashboard for prod data
$ export GCLOUD_KEY=#your_secret # Required for reading/writing from Google Cloud
$ export COCOON_USE_IN_MEMORY_CACHE=true # Use an in memory cache locally instead of redis to prevent corruption
$ dart bin/server.dart

This will output Serving requests at 0.0.0.0:8080 indicating the server is working.

New requests will be logged to the console.

To develop and test some features, you need to have a local service account(key.json) with access to the project you will be connecting to.

If you work for Google you can use the key with flutter-dashboard project via internal doc.

Deploying a test version on Google Cloud

To run live tests, build the app, and provide instructions for deploying to Google App Engine, run this command:

dart dev/deploy.dart --project {PROJECT} --version {VERSION}

You can test the new version by accessing {VERSION}-dot-flutter-dashboard.appspot.com in your browser. If the result is satisfactory, the new version can be activated by using the Cloud Console UI: https://console.cloud.google.com/appengine/versions?project=flutter-dashboard&serviceId=default

Optional flags

--profile: Deploy a profile mode of dashboard application for debugging purposes.

--ignore-version-check: Ignore the version of Flutter on path (expects to be relatively recent)

Developing the dashboard

The dashboard application will use dummy data when it is not connected to the server, so it can be developed locally without a dev server.

To run the dashboard locally, go into the dashboard directory and run flutter run -d chrome. The dashboard will be served from localhost (the exact address will be given on the console); copy the URL into your browser to view the application. (The dashboard should also be able to run on non-Web platforms, but since the Web is our main target that is the one that should generally be used for development.)

You can run flutter packages upgrade to update the dependencies. This may be necessary if you see a failure in the dependencies.

More Repositories

1

flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
Dart
157,868
star
2

plugins

Plugins for Flutter maintained by the Flutter team
Dart
17,165
star
3

samples

A collection of Flutter examples and demos
Dart
15,939
star
4

engine

The Flutter engine
C++
6,852
star
5

gallery

Flutter Gallery is a resource to help developers evaluate and use Flutter
Dart
5,866
star
6

packages

A collection of useful packages maintained by the Flutter team
Dart
3,600
star
7

website

Flutter documentation web site
Dart
2,573
star
8

pinball

Google I/O 2022 Pinball game built with Flutter and Firebase
Dart
2,191
star
9

flutter-intellij

Flutter Plugin for IntelliJ
Java
1,906
star
10

codelabs

Flutter codelab examples
C
1,568
star
11

devtools

Performance tools for Flutter
Dart
1,466
star
12

news_toolkit

A news template application built in Flutter, by Google and Very Good Ventures. Learn more at: https://flutter.github.io/news_toolkit
Dart
1,016
star
13

photobooth

Google I/O 2021 Photo Booth built with Flutter and Firebase
Dart
894
star
14

io_flip

Google I/O 2023 FLIP AI-designed card game built with Flutter & Firebase
Dart
597
star
15

flutter_clock

Dart
542
star
16

put-flutter-to-work

A Flutter add-to-app demo you can try with your own apps
Dart
309
star
17

holobooth

Jump into a new reality to bring Dash and Sparky to life!
Dart
230
star
18

tests

Contributed tests for Flutter
Dart
219
star
19

uxr

UXR work for Flutter
Dart
214
star
20

impeller

Affects Flow
155
star
21

buildroot

Build environment for the Flutter engine
Python
120
star
22

assets-for-api-docs

Static assets for embedding into docs.flutter.io
Dart
113
star
23

tools_metadata

Metadata files about the flutter framework
Dart
66
star
24

web_installers

Web install scripts for CI for Flutter Web
Dart
42
star
25

goldens

Shell
41
star
26

platform_tests

Tools & tests to verify Flutter's fidelity on specific platforms
Dart
37
star
27

games

Home of the Flutter Casual Games Toolkit and other Flutter gaming templates
Dart
27
star
28

.github

Default community health files for Flutter
26
star
29

flutter-github-scripts.dart

Scripts to facilitate generating reports on the health of the Flutter repositories.
Dart
19
star
30

flutter.github.io

Root of flutter.github.io
HTML
13
star