https://github.com/bitrise-steplib/steps-testfairy-deploy
https://github.com/bitrise-steplib/steps-testfairy-deploy
bitrise bitrise-step ci production-code
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bitrise-steplib/steps-testfairy-deploy
- Owner: bitrise-steplib
- License: mit
- Created: 2015-02-25T12:06:15.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-03-21T12:17:37.000Z (about 2 years ago)
- Last Synced: 2025-03-24T07:52:43.278Z (about 1 year ago)
- Topics: bitrise, bitrise-step, ci, production-code
- Language: Shell
- Homepage:
- Size: 31.3 KB
- Stars: 2
- Watchers: 10
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StepTestFairyDeploy
## Test run this Step on your own machine
Steps get their inputs through Environment Variables.
The Step's inputs are described in the `step.yml` Step
description file.
To run a Step locally you have to define it's
inputs (environment variables) before you could run
the Step.
A simple way to do this in your Command Line / Terminal
is to call it like this:
cd path/to/step/directory
(
export INPUT_VAR_1="My value 1"
export INPUT_VAR_2="My value 2"
...
bash step.sh
)
*Including the environment variable definitions
in a `(...)` block helps to keep your
Command Line / Terminal environment clean, those
input environments are only available
inside the `(...)` block.*
If you plan to test it multiple times you can
save this as a shell script
and simply call it as many times as you want to.
## Create your own Step:
1. Create a new repository on GitHub
2. Copy the files from the [step-template repository](https://github.com/steplib/step-template)
3. Commit and push it
Hurray, you just created your first Step repository!
You can now start coding and when you're ready
you can submit your Step to the [Open Step Library](http://www.steplib.com/).
## Step Repository Structure
### step.sh
This is the **entry point of the Step**. A StepLib
system will execute this file when it runs the Step.
You can run other scripts and programs from
*step.sh*. For example if you want to write your
Step in ruby then all you have to include in the *step.sh*
file is the code to run your own ruby script,
something like this:
#!/bin/bash
THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ruby "${THIS_SCRIPT_DIR}/my_ruby_script.rb"
exit $?
**inputs**: a Step should get it's inputs through
*environment variables*. These inputs can be (and should be)
specified in the *step.yml* description of the Step.
**exit code**: the exit code generated by step.sh
is interpreted as the success/failure code of the whole Step.
If it returns 0 the Step will be considered as successful.
If it returns with a greater than 0 exit code then
the Step is considered to be failed.
### step.yml
Description of the step in YAML format.
Specifies information for StepLib users like what platforms
the Step supports, what's the official website of the
Step, where can a user find the Step's code and
where can a user fork the Step.
Also defines an input list for the Step which then
can be presented as User Interface for the Step
and a StepLib compatible system can interpret these
inputs and map the user input values to
environment variables which will be available for the Step.
For a full description of the *step.yml* description
file see the documentation on GitHub: [https://github.com/steplib/steplib/blob/master/docs/step_format.md](https://github.com/steplib/steplib/blob/master/docs/step_format.md)
### LICENSE
We don't accept steps into the StepLib without a license included in it!
Read more about why it's important to have a license file
in your open source repository on GitHub: [https://github.com/steplib/steplib/blob/master/templates/step/LICENSE](https://github.com/steplib/steplib/blob/master/templates/step/LICENSE).
### README.md
Technically README is not required but we strongly suggest
against not using one.
It can be a very simple description of what your Step does,
in just a couple of sentences.
Best practice is to include information about how
someone else can contribute to the development of the Step.
You can also include a link to the StepLib website, including your
own Step's page on StepLib (once it's submitted
into the Open StepLib collection), something like this:
This Step is part of the [Open StepLib](http://www.steplib.com/),
you can find its page on StepLib [here](http://www.steplib.com/step/your-step-id).
## How to submit your Step into the Open Step Library
To submit a Step to the [Open Step Library](http://www.steplib.com/)
you have to create a Pull Request in the StepLib's spec repository
and include your step's `step.yml` description file
in the **steps/** folder.
1. Create your Step repository as described above.
2. Fork the StepLib spec repository: [https://github.com/steplib/steplib](https://github.com/steplib/steplib)
3. Create a new folder inside the **steps/** folder (in your forked StepLib spec repository) if it's the first version of your Step. (Example path: `steps/my-step`). *Note: The name of the folder will be the ID of your Step.*
4. Create a folder inside your step's folder with the name of a version tag you added to your Step repository. (Example path: `steps/my-step/1.0.0`). **You have to actually use this tag in your repository**. When a user wants to use this version of your Step the StepLib system will try to clone your Step repository with the specified version tag!
5. Copy your step.yml into this version folder (Example path: `steps/my-step/1.0.0/step.yml`)
6. Create and send a Pull Request
*Before you submit your Step into a Step Library you should test it in a StepLib compatible system.
You can use a free [Bitrise](http://www.bitrise.io/) account to test your Step.*
## Trigger a new release
- __merge every code changes__ to the `master` branch
- __push the new version tag__ to the `master` branch