Use the Bitrise step
With the Bitrise plugin step (also called the Bitrise step), you can use Bitrise Workflow Steps in your Harness CI pipelines. For more information about plugins in CI pipelines, go to Explore plugins.
Currently, the Bitrise plugin step is supported for Harness Cloud build infrastructure only. For other build infrastructures, you can run Bitrise Workflow Steps in a Run step or write a custom plugin.
Bitrise step usage example
In the following YAML example, a Harness Bitrise step runs the Android Build Bitrise step. It calls the source repo (bitrise-steplib/bitrise-step-android-build) and provides configuration parameters as described in the Android Build README.
- step:
type: Bitrise
name: bitrise android build
identifier: bitrise_android_build
spec:
uses: github.com/bitrise-steplib/bitrise-step-android-build.git
with:
variant: 'debug'
build_type: 'apk'
Bitrise step settings and specifications
- YAML editor
- Visual editor
Add a Bitrise
step to your pipeline, for example:
- step:
type: Bitrise
name: bitrise android build
identifier: bitrise_android_build
spec:
uses: github.com/bitrise-steplib/bitrise-step-android-build.git
with:
variant: 'debug'
build_type: 'apk'
The spec
parameters define which Bitrise Step to use, the Bitrise Step inputs, and the environment variables that you want to pass in. These are configured according to the Bitrise Step's usage specifications.
uses:
Specify the Bitrise Steps's source repo, such asgithub.com/bitrise-steplib/bitrise-step-android-build.git
.with:
If required by the Bitrise Step, provide a mapping of key-value pairs representing inputs, such asbuild_type: 'apk'
. For more information, go to Settings.env:
If required by the Bitrise Step, provide a mapping of environment variables to pass in. For more information, go to Environment Variables.
If you already configured Bitrise Steps elsewhere, you can transfer Bitrise Steps into Harness CI.
You can use expressions in the with
and env
settings. For example, credentials: <+stage.variables.[TOKEN_SECRET]>
uses an expression referencing a stage variable.
In the Visual editor, add the Bitrise plugin step to your pipeline's Build stage, and then populate the settings. Name and Uses are required. Refer to each Bitrise Step's documentation for information about Settings and Environment Variables.