bitrise

Reuse Bitrise step without developing custom one


Is there any way to reuse step across Bitrise workflows? For example, let's say I have script step with bunch of shell script in it. I do not want to create my "own" full-grown step. The script is changing something in codebase and the changes will further be used by other steps of given workflow.


Solution

  • If you plan to use it across many apps the best solution is to convert it to a step - if you already have it as a script it's really simple using the bitrise CLI (bitrise :step create). That way you can version it and you can manage when a given workflow is updated to the new version.

    If you don't want to do that, you can use the Remote Bash Script Runner https://www.bitrise.io/integrations/steps/remote-script-runner step to run your script from a URL (e.g. from a secret GitHub Gist).

    Alternatively you can also include your script in your repository, and then run that from a Script step or via the Script Runner step (https://www.bitrise.io/integrations/steps/script-runner).

    There's also an unofficial step to run a script from a private github repo: https://www.bitrise.io/integrations/steps/github-script-runner