Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mate Herber
committed
Aug 18, 2021
1 parent
0e8a878
commit d6e6a10
Showing
2 changed files
with
38 additions
and
81 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,94 +1,47 @@ | ||
# Wait for Android emulator step | ||
# Wait for Android emulator | ||
|
||
If your workflow contains `start-android-emulator` step, | ||
and you've set `wait_for_boot` param to false, use this step to check | ||
if android emulator is booted or wait for finishing boot. | ||
[![Step changelog](https://shields.io/github/v/release/bitrise-steplib/steps-wait-for-android-emulator?include_prereleases&label=changelog&color=blueviolet)](https://github.com/bitrise-steplib/steps-wait-for-android-emulator/releases) | ||
|
||
Wait for the emulator to finish boot | ||
|
||
## How to use this Step | ||
<details> | ||
<summary>Description</summary> | ||
|
||
Can be run directly with the [bitrise CLI](https://github.com/bitrise-io/bitrise), | ||
just `git clone` this repository, `cd` into it's folder in your Terminal/Command Line | ||
and call `bitrise run test`. | ||
If your workflow contains the `start-android-emulator` step, | ||
and you've set the `wait_for_boot` parameter to `false`, use this step to check | ||
if the android emulator is booted or wait for it to finish booting. | ||
</details> | ||
|
||
*Check the `bitrise.yml` file for required inputs which have to be | ||
added to your `.bitrise.secrets.yml` file!* | ||
## 🧩 Get started | ||
|
||
Step by step: | ||
Add this step directly to your workflow in the [Bitrise Workflow Editor](https://devcenter.bitrise.io/steps-and-workflows/steps-and-workflows-index/). | ||
|
||
1. Open up your Terminal / Command Line | ||
2. `git clone` the repository | ||
3. `cd` into the directory of the step (the one you just `git clone`d) | ||
5. Create a `.bitrise.secrets.yml` file in the same directory of `bitrise.yml` - the `.bitrise.secrets.yml` is a git ignored file, you can store your secrets in | ||
6. Check the `bitrise.yml` file for any secret you should set in `.bitrise.secrets.yml` | ||
* Best practice is to mark these options with something like `# define these in your .bitrise.secrets.yml`, in the `app:envs` section. | ||
7. Once you have all the required secret parameters in your `.bitrise.secrets.yml` you can just run this step with the [bitrise CLI](https://github.com/bitrise-io/bitrise): `bitrise run test` | ||
You can also run this step directly with [Bitrise CLI](https://github.com/bitrise-io/bitrise). | ||
|
||
An example `.bitrise.secrets.yml` file: | ||
## ⚙️ Configuration | ||
|
||
``` | ||
envs: | ||
- A_SECRET_PARAM_ONE: the value for secret one | ||
- A_SECRET_PARAM_TWO: the value for secret two | ||
``` | ||
<details> | ||
<summary>Inputs</summary> | ||
|
||
## How to create your own step | ||
| Key | Description | Flags | Default | | ||
| --- | --- | --- | --- | | ||
| `emulator_serial` | Emulator with the given serial will be checked if booted, or wait for it to boot. | required | `$BITRISE_EMULATOR_SERIAL` | | ||
| `boot_timeout` | Maximum time to wait for emulator to boot. | required | `300` | | ||
| `android_home` | Android sdk path | required | `$ANDROID_HOME` | | ||
</details> | ||
|
||
1. Create a new git repository for your step (**don't fork** the *step template*, create a *new* repository) | ||
2. Copy the [step template](https://github.com/bitrise-steplib/step-template) files into your repository | ||
3. Fill the `step.sh` with your functionality | ||
4. Wire out your inputs to `step.yml` (`inputs` section) | ||
5. Fill out the other parts of the `step.yml` too | ||
6. Provide test values for the inputs in the `bitrise.yml` | ||
7. Run your step with `bitrise run test` - if it works, you're ready | ||
<details> | ||
<summary>Outputs</summary> | ||
There are no outputs defined in this step | ||
</details> | ||
|
||
__For Step development guidelines & best practices__ check this documentation: [https://github.com/bitrise-io/bitrise/blob/master/_docs/step-development-guideline.md](https://github.com/bitrise-io/bitrise/blob/master/_docs/step-development-guideline.md). | ||
## 🙋 Contributing | ||
|
||
**NOTE:** | ||
We welcome [pull requests](https://github.com/bitrise-steplib/steps-wait-for-android-emulator/pulls) and [issues](https://github.com/bitrise-steplib/steps-wait-for-android-emulator/issues) against this repository. | ||
|
||
If you want to use your step in your project's `bitrise.yml`: | ||
For pull requests, work on your changes in a forked repository and use the Bitrise CLI to [run step tests locally](https://devcenter.bitrise.io/bitrise-cli/run-your-first-build/). | ||
|
||
1. git push the step into it's repository | ||
2. reference it in your `bitrise.yml` with the `git::PUBLIC-GIT-CLONE-URL@BRANCH` step reference style: | ||
Learn more about developing steps: | ||
|
||
``` | ||
- git::https://github.com/user/my-step.git@branch: | ||
title: My step | ||
inputs: | ||
- my_input_1: "my value 1" | ||
- my_input_2: "my value 2" | ||
``` | ||
|
||
You can find more examples of step reference styles | ||
in the [bitrise CLI repository](https://github.com/bitrise-io/bitrise/blob/master/_examples/tutorials/steps-and-workflows/bitrise.yml#L65). | ||
|
||
## How to contribute to this Step | ||
|
||
1. Fork this repository | ||
2. `git clone` it | ||
3. Create a branch you'll work on | ||
4. To use/test the step just follow the **How to use this Step** section | ||
5. Do the changes you want to | ||
6. Run/test the step before sending your contribution | ||
* You can also test the step in your `bitrise` project, either on your Mac or on [bitrise.io](https://www.bitrise.io) | ||
* You just have to replace the step ID in your project's `bitrise.yml` with either a relative path, or with a git URL format | ||
* (relative) path format: instead of `- original-step-id:` use `- path::./relative/path/of/script/on/your/Mac:` | ||
* direct git URL format: instead of `- original-step-id:` use `- git::https://github.com/user/step.git@branch:` | ||
* You can find more example of alternative step referencing at: https://github.com/bitrise-io/bitrise/blob/master/_examples/tutorials/steps-and-workflows/bitrise.yml | ||
7. Once you're done just commit your changes & create a Pull Request | ||
|
||
|
||
## Share your own Step | ||
|
||
You can share your Step or step version with the [bitrise CLI](https://github.com/bitrise-io/bitrise). If you use the `bitrise.yml` included in this repository, all you have to do is: | ||
|
||
1. In your Terminal / Command Line `cd` into this directory (where the `bitrise.yml` of the step is located) | ||
1. Run: `bitrise run test` to test the step | ||
1. Run: `bitrise run audit-this-step` to audit the `step.yml` | ||
1. Check the `share-this-step` workflow in the `bitrise.yml`, and fill out the | ||
`envs` if you haven't done so already (don't forget to bump the version number if this is an update | ||
of your step!) | ||
1. Then run: `bitrise run share-this-step` to share the step (version) you specified in the `envs` | ||
1. Send the Pull Request, as described in the logs of `bitrise run share-this-step` | ||
|
||
That's all ;) | ||
- [Create your own step](https://devcenter.bitrise.io/contributors/create-your-own-step/) | ||
- [Testing your Step](https://devcenter.bitrise.io/contributors/testing-and-versioning-your-steps/) |
This file contains 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