Use the Bitrise plugin step
With the Bitrise plugin step, you can use Bitrise Integrations 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 the Harness Cloud build infrastructure only.
Usage example
In the following YAML example, a Bitrise plugin step uses the Bitrise Android Build 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'
Settings and specifications
- YAML editor
- Visual editor
To add a Bitrise plugin step to your pipeline YAML, add a Bitrise
step, 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 Integration to use, Bitrise Integration inputs, and environment variables that you want to pass to the Integration. These are configured according to the Integration's usage specifications.
uses:
Specify the Bitrise Integration's source repo, such asgithub.com/bitrise-steplib/bitrise-step-android-build.git
.with:
If required by the Integration, provide a mapping of key-value pairs representing Integration inputs, such asbuild_type: 'apk'
.env:
If required by the Integration, provide a mapping of environment variables to pass to the Integration.
If you already configured Bitrise Integrations elsewhere, you can transfer Bitrise Integrations into Harness CI.
You can use variable expressions in the with
and env
settings. For example, credentials: <+stage.variables.[TOKEN_SECRET]>
uses a stage variable.
In the Visual editor, add the Bitrise plugin step to your pipeline's Build stage, and then populate the settings. The Name and Uses fields are required.
Name
Enter a name summarizing the step's purpose. Harness automatically assigns an Id (Entity Identifier Reference) based on the Name. You can change the Id.
Description
Optional text string describing the step's purpose.
Uses
Specify the repo of the Bitrise Integration that you want to use, for example github.com/bitrise-steplib/bitrise-step-android-build.git
.
Settings
Found under Optional Configuration. If required by the Integration, add key-value pairs representing Integration inputs. For example, you would specify build_type: 'apk'
by entering build_type
in the key field and apk
in the value field.
Refer to the Integration's usage specifications for details about specific inputs available for the Integration that you want to use.
Settings as a whole can be supplied as fixed values or runtime input, and individual setting values can be supplied as fixed values, runtime input, or expressions. Select the Thumbtack to change input types.
Environment Variables
Found under Optional Configuration. If required by the Integration, add key-value pairs representing environment variables that you want to pass to the Integration. For example, you would specify GITHUB_TOKEN: <+secrets.getValue("github_pat")>
by entering GITHUB_TOKEN
in the key field and <+secrets.getValue("github_pat")>
in the value field.
Refer to the Integration's usage specifications for details about specific environment variables relevant to the plugin you want to use. Note that env
specifies incoming environment variables, which are separate from outgoing environment variables that are output by the Integration.
You can use fixed values, runtime input, or variable expressions for environment variable values. For example, <+stage.variables.[TOKEN_SECRET]>
is a stage variable. Select the Thumbtack to change input types.
Timeout
Found under Optional Configuration. Set the timeout limit for the step. Once the timeout limit is reached, the step fails and pipeline execution continues. To set skip conditions or failure handling for steps, go to:
Transfer Bitrise Integrations into Harness CI
If you already configured Bitrise Integrations elsewhere, the Bitrise inputs
mapping is equivalent to the Harness Bitrise plugin step's spec: with:
mapping. The following table compares Bitrise inputs
specification with the equivalent Harness with
specification.
Bitrise `inputs` | Harness `with` |
|
|