-
Notifications
You must be signed in to change notification settings - Fork 100
add README.md for agent #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Cocoon Agent | ||
|
|
||
| An _agent_ runs on a computer and runs tests reserved for it by the Cocoon | ||
| backend. It may or may not have physical devices attached to it. | ||
|
|
||
| ## Starting an agent | ||
|
|
||
| Agent has several subcommands: | ||
|
|
||
| `run` command runs a single task. Here's how you run it: | ||
|
|
||
| ```sh | ||
| dart bin/agent.dart run --task-name={TASK_NAME} | ||
| ``` | ||
|
|
||
| It runs the task at the currently synced version of Flutter. | ||
|
|
||
| `ci` command runs the agent in _continuous integration_ mode. It continuously | ||
| asks the Cocoon backend for available tasks, syncs Flutter to the desired | ||
| revision and runs the task. Use it like this: | ||
|
|
||
| ```sh | ||
| dart bin/agent.dart ci | ||
| ``` | ||
|
|
||
| ## Setting up a Mac agent | ||
|
|
||
| Follow Flutter's [setup guide](https://flutter.io/setup/). Make sure Flutter | ||
| runs successfully for the kind of test scenarios you intend to use the agent | ||
| for. For example, if you plan to run tests on a real Android device, make sure | ||
| there _is_ an Android device attached, the Android SDK installed and you are | ||
| able to run one of the sample Flutter apps on the device. | ||
|
|
||
| ## Agent configuration | ||
|
|
||
| ### Creating agent and acquiring auth tokens | ||
|
|
||
| Pick a good ID for the agent. If there are existing agents performing the | ||
| same set of tasks give it the same ID with a different number. For example, if | ||
| there are "mac1" and "mac2", and you are adding another Mac build agent, call it | ||
| "mac3". If you are adding an agent that doesn't fit within any of the existing | ||
| groups, pick a new ID and start numbering beginning from 1, e.g. "linux1". | ||
|
|
||
| Read [Creating an agent](https://github.com/flutter/cocoon#creating-an-agent) | ||
| about how to create the agent and acquire an authentication token to connect it | ||
| to Cocoon. | ||
|
|
||
| To authenticate with Firebase read go/flutter-cocoon. | ||
|
|
||
| At the end of this exercise you should have an agent ID, a Cocoon auth token | ||
| and a Firebase auth token. | ||
|
|
||
| ### config.yaml | ||
|
|
||
| You will need to enter information acquired in the previous step into a | ||
| `config.yaml` file. See the | ||
| [sample config file](https://github.com/flutter/cocoon/blob/master/agent/config.sample.yaml) | ||
| that documents all parameters in detail. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to use a go link here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link points to internal docs, but I wanted the link to be stable. Is there a better way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just making sure.