# Bitrise

> Start, abort and rebuild Bitrise builds and pipelines, read build logs and artifacts, manage project secrets, and follow new, successful and failed builds.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/bitrise

## Actions

### Abort build

Stop a running build, with a reason shown on it.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Build (`build_slug`, text, required): The build.
- Reason (`abort_reason`, text): Why the build was stopped. Leave empty to say it was stopped from a workflow.
- Count as successful (`abort_with_success`, true/false): Count the build as successful rather than failed.
- Skip notifications (`skip_notifications`, true/false): Don't send the build's notifications.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "status": "example"
  }
}
```

### Abort pipeline run

Stop a running pipeline, with a reason shown on it.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Pipeline run (`pipeline_id`, text, required): The pipeline run.
- Reason (`abort_reason`, text): Why the pipeline was stopped. Leave empty to say it was stopped from a workflow.
- Count as successful (`abort_with_success`, true/false): Count the pipeline as successful rather than failed.
- Skip notifications (`skip_notifications`, true/false): Don't send the pipeline's notifications.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {}
}
```

### Delete artifact

Delete a build artifact. This can't be undone.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Build (`build_slug`, text, required): The build.
- Artifact (`artifact_slug`, text, required): The build artifact.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": {
      "artifact_meta": {},
      "artifact_type": "example",
      "expiring_download_url": "example",
      "file_size_bytes": 1,
      "is_public_page_enabled": true,
      "public_install_page_url": "example",
      "slug": "example",
      "title": "example"
    }
  }
}
```

### Delete secret

Delete a project secret.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Secret (`name`, text, required): The secret.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {}
}
```

### Get artifact

Get an artifact with a download link that works for 10 minutes and its public install page.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Build (`build_slug`, text, required): The build.
- Artifact (`artifact_slug`, text, required): The build artifact.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": {
      "artifact_meta": {},
      "artifact_type": "example",
      "expiring_download_url": "example",
      "file_size_bytes": 1,
      "is_public_page_enabled": true,
      "public_install_page_url": "example",
      "slug": "example",
      "title": "example"
    }
  }
}
```

### Get bitrise.yml

Get a project's full configuration: its workflows, steps and trigger map, as YAML text.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "yaml": "example"
  }
}
```

### Get build

Get a build's status, workflow, branch, commit and timing.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Build (`build_slug`, text, required): The build.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": {
      "abort_reason": "example",
      "branch": "example",
      "build_number": 1,
      "commit_hash": "example",
      "commit_message": "example",
      "commit_view_url": "example",
      "credit_cost": 1,
      "finished_at": "example",
      "is_on_hold": true,
      "machine_type_id": "example",
      "original_build_params": {},
      "pipeline_workflow_id": "example",
      "pull_request_id": 1,
      "pull_request_target_branch": "example",
      "pull_request_view_url": "example",
      "slug": "example",
      "stack_identifier": "example",
      "started_on_worker_at": "example",
      "status": 1,
      "status_text": "example",
      "tag": "example",
      "triggered_at": "example",
      "triggered_by": "example",
      "triggered_workflow": "example"
    }
  }
}
```

### Get build log

Get the end of a build's log and a link to the full log that works for 10 minutes.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Build (`build_slug`, text, required): The build.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "expiring_raw_log_url": "example",
    "is_archived": true,
    "log_chunks": [
      {
        "chunk": "example",
        "position": 1
      }
    ]
  }
}
```

### Get pipeline run

Get a pipeline run's status, stages and trigger.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Pipeline run (`pipeline_id`, text, required): The pipeline run.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "abort_reason": "example",
    "app": {
      "slug": "example"
    },
    "finished_at": "example",
    "id": "example",
    "name": "example",
    "number_in_app_scope": 1,
    "rebuildable": true,
    "stages": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "started_at": "example",
    "status": "example",
    "trigger_params": {
      "branch": "example",
      "commit_hash": "example",
      "commit_message": "example",
      "tag": "example"
    },
    "triggered_at": "example",
    "triggered_by": "example"
  }
}
```

### Get profile

Get the Bitrise account the token belongs to.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": {
      "avatar_url": "example",
      "created_at": "example",
      "email": "example",
      "slug": "example",
      "username": "example"
    }
  }
}
```

### Get project

Get a project's title, type, repository and owner.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": {
      "avatar_url": "example",
      "is_disabled": true,
      "is_public": true,
      "owner": {
        "account_type": "example",
        "name": "example",
        "slug": "example"
      },
      "project_type": "example",
      "provider": "example",
      "repo_owner": "example",
      "repo_slug": "example",
      "repo_url": "example",
      "slug": "example",
      "status": 1,
      "title": "example"
    }
  }
}
```

### List artifacts

List the files a build produced, such as an .ipa or .apk.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Build (`build_slug`, text, required): The build.
- Limit (`limit`, number): How many artifacts to return, up to 50. Leave empty for Bitrise's default. From 1 to 50.
- Next page (`next`, text): The paging.next value from the last answer, to read the next page of artifacts.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "artifact_meta": {},
        "artifact_type": "example",
        "file_size_bytes": 1,
        "is_public_page_enabled": true,
        "slug": "example",
        "title": "example"
      }
    ],
    "paging": {
      "next": "example",
      "page_item_limit": 1,
      "total_item_count": 1
    }
  }
}
```

### List branches

List the branches of a project's repository that have been built.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": [
      "example"
    ]
  }
}
```

### List builds

List a project's builds, newest first, by workflow, branch, status or time.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Workflow (`workflow`, text): Only builds of this workflow.
- Branch (`branch`, text): Only builds of this branch.
- Status (`status`, text): Only builds with this outcome. One of: `0` (Not finished), `1` (Successful), `2` (Failed), `3` (Aborted with failure), `4` (Aborted with success).
- Started by (`trigger_event_type`, text): Only builds started by this kind of event. One of: `push`, `pull-request` (Pull request), `tag`.
- Pull request (`pull_request_id`, number): Only builds of this pull request number. At least 1.
- Build number (`build_number`, number): Only the build with this number. At least 1.
- Started after (`after`, date and time): Only builds started after this time.
- Started before (`before`, date and time): Only builds started before this time.
- Sort by (`sort_by`, text): Which order to list them in. Leave empty for newest first. One of: `created_at` (Created), `running_first` (Running builds first).
- Limit (`limit`, number): How many builds to return, up to 50. Leave empty for Bitrise's default. From 1 to 50.
- Next page (`next`, text): The paging.next value from the last answer, to read the next page of builds.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "abort_reason": "example",
        "branch": "example",
        "build_number": 1,
        "commit_hash": "example",
        "commit_message": "example",
        "commit_view_url": "example",
        "credit_cost": 1,
        "finished_at": "example",
        "is_on_hold": true,
        "machine_type_id": "example",
        "original_build_params": {},
        "pipeline_workflow_id": "example",
        "pull_request_id": 1,
        "pull_request_target_branch": "example",
        "pull_request_view_url": "example",
        "slug": "example",
        "stack_identifier": "example",
        "started_on_worker_at": "example",
        "status": 1,
        "status_text": "example",
        "tag": "example",
        "triggered_at": "example",
        "triggered_by": "example",
        "triggered_workflow": "example"
      }
    ],
    "paging": {
      "next": "example",
      "page_item_limit": 1,
      "total_item_count": 1
    }
  }
}
```

### List builds across projects

List builds of every project the account can reach, optionally one workspace's or by status.

**Inputs**

- Workspace (`owner_slug`, text): Only builds of this workspace's projects.
- Status (`status`, text): Only builds with this outcome. One of: `0` (Not finished), `1` (Successful), `2` (Failed), `3` (Aborted with failure), `4` (Aborted with success).
- Waiting to start (`is_on_hold`, true/false): Only builds that are waiting to start (on) or have started (off).
- Limit (`limit`, number): How many builds to return, up to 50. Leave empty for Bitrise's default. From 1 to 50.
- Next page (`next`, text): The paging.next value from the last answer, to read the next page of builds.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "abort_reason": "example",
        "branch": "example",
        "build_number": 1,
        "commit_hash": "example",
        "commit_message": "example",
        "commit_view_url": "example",
        "credit_cost": 1,
        "finished_at": "example",
        "is_on_hold": true,
        "machine_type_id": "example",
        "original_build_params": {},
        "pipeline_workflow_id": "example",
        "pull_request_id": 1,
        "pull_request_target_branch": "example",
        "pull_request_view_url": "example",
        "repository": {
          "avatar_url": "example",
          "is_disabled": true,
          "is_public": true,
          "owner": {
            "account_type": "example",
            "name": "example",
            "slug": "example"
          },
          "project_type": "example",
          "provider": "example",
          "repo_owner": "example",
          "repo_slug": "example",
          "repo_url": "example",
          "slug": "example",
          "status": 1,
          "title": "example"
        },
        "slug": "example",
        "stack_identifier": "example",
        "started_on_worker_at": "example",
        "status": 1,
        "status_text": "example",
        "tag": "example",
        "triggered_at": "example",
        "triggered_by": "example",
        "triggered_workflow": "example"
      }
    ],
    "paging": {
      "next": "example",
      "page_item_limit": 1,
      "total_item_count": 1
    }
  }
}
```

### List pipeline runs

List a project's pipeline runs and standalone builds, newest first.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Pipeline (`pipeline`, text): Only runs of the pipeline with this name.
- Workflow (`workflow`, text): Only runs of this workflow.
- Branch (`branch`, text): Only runs of this branch.
- Status (`status`, text): Only runs with this status. One of: `on_hold` (On hold), `running`, `succeeded`, `failed`, `aborted`, `succeeded_with_abort` (Succeeded with abort).
- Started by (`trigger_event_type`, text): Only runs started by this kind of event. One of: `push`, `pull-request` (Pull request), `tag`.
- Started after (`after`, date and time): Only runs started after this time.
- Started before (`before`, date and time): Only runs started before this time.
- Limit (`limit`, number): How many runs to return. Leave empty for Bitrise's default of 10. From 1 to 50.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "branch": "example",
        "build_number": 1,
        "commit_hash": "example",
        "commit_message": "example",
        "credit_cost": 1,
        "finished_at": "example",
        "is_on_hold": true,
        "is_pipeline": true,
        "pull_request_id": 1,
        "slug": "example",
        "started_at": "example",
        "status": 1,
        "tag": "example",
        "triggered_at": "example",
        "triggered_by": "example",
        "triggered_workflow": "example"
      }
    ],
    "paging": {
      "next": "example",
      "page_item_limit": 1,
      "total_item_count": 1
    }
  }
}
```

### List projects

List the Bitrise projects (apps) the account can reach, optionally by title or type.

**Inputs**

- Title (`title`, text): Only the project with this title.
- Project type (`project_type`, text): Only projects of this type, such as ios, android or flutter.
- Sort by (`sort_by`, text): Which order to list them in. Leave empty for the latest build first. One of: `last_build_at` (Last build), `created_at` (Created).
- Limit (`limit`, number): How many projects to return, up to 50. Leave empty for Bitrise's default. From 1 to 50.
- Next page (`next`, text): The paging.next value from the last answer, to read the next page of projects.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "avatar_url": "example",
        "is_disabled": true,
        "is_public": true,
        "owner": {
          "account_type": "example",
          "name": "example",
          "slug": "example"
        },
        "project_type": "example",
        "provider": "example",
        "repo_owner": "example",
        "repo_slug": "example",
        "repo_url": "example",
        "slug": "example",
        "status": 1,
        "title": "example"
      }
    ],
    "paging": {
      "next": "example",
      "page_item_limit": 1,
      "total_item_count": 1
    }
  }
}
```

### List secrets

List a project's secrets and their settings, without their values.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "secrets": [
      {
        "expand_in_step_inputs": true,
        "id": "example",
        "is_exposed_for_pull_requests": true,
        "is_protected": true,
        "name": "example",
        "scope": "example"
      }
    ]
  }
}
```

### List workflows

List the workflows a project has run.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": [
      "example"
    ]
  }
}
```

### List workspaces

List the workspaces (organizations) the account belongs to.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "avatar_icon_url": "example",
        "concurrency_count": 1,
        "name": "example",
        "slug": "example"
      }
    ]
  }
}
```

### Rebuild build

Run a finished build again with the same parameters and workflow.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Build (`build_slug`, text, required): The build.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "message": "example",
    "results": [
      {
        "build_number": 1,
        "build_slug": "example",
        "build_url": "example",
        "message": "example",
        "status": "example",
        "triggered_pipeline": "example",
        "triggered_workflow": "example"
      }
    ],
    "service": "example",
    "slug": "example",
    "status": "example"
  }
}
```

### Rebuild pipeline run

Run a finished pipeline again, in full or only its failed workflows and those after them.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Pipeline run (`pipeline_id`, text, required): The pipeline run.
- Only failed workflows (`partial`, true/false): Rerun only the workflows that failed and those after them.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {}
}
```

### Set secret

Create a project secret, or replace the value and settings of the one with this name.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Name (`name`, text, required): The secret's name, such as API_KEY. Steps read it as $API_KEY.
- Value (`value`, text, required): The secret's value.
- Protected (`is_protected`, true/false): Protect the secret: its value can't be read or changed afterwards, only replaced by deleting it.
- Expose for pull requests (`is_exposed_for_pull_requests`, true/false): Let builds of pull requests read the secret.
- Expand in step inputs (`expand_in_step_inputs`, true/false): Replace $NAME references in step inputs with the value.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "name": "example",
    "saved": true
  }
}
```

### Start build

Start a build of a workflow or pipeline on a branch, tag or commit, with extra environment variables.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Workflow (`workflow`, text): The workflow to run. Leave empty to let the trigger map pick one from the branch.
- Pipeline (`pipeline_id`, text): A pipeline to run instead of a workflow.
- Branch (`branch`, text): The branch to build, such as main.
- Tag (`tag`, text): A Git tag to build.
- Commit (`commit_hash`, text): A commit to build.
- Message (`commit_message`, text): A message to show on the build.
- Environment variables (`environments`, object): Environment variables for this build, by name.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "message": "example",
    "results": [
      {
        "build_number": 1,
        "build_slug": "example",
        "build_url": "example",
        "message": "example",
        "status": "example",
        "triggered_pipeline": "example",
        "triggered_workflow": "example"
      }
    ],
    "service": "example",
    "slug": "example",
    "status": "example"
  }
}
```

### Update artifact

Turn an artifact's public install page on or off.

**Inputs**

- Project (`app_slug`, text, required): The Bitrise project (app).
- Build (`build_slug`, text, required): The build.
- Artifact (`artifact_slug`, text, required): The build artifact.
- Public install page (`is_public_page_enabled`, true/false, required): Whether anyone with the link can open the artifact's install page.

**Outputs**

- `data` (object): The response from Bitrise.

**Example output**

```json
{
  "data": {
    "data": {
      "artifact_meta": {},
      "artifact_type": "example",
      "expiring_download_url": "example",
      "file_size_bytes": 1,
      "is_public_page_enabled": true,
      "public_install_page_url": "example",
      "slug": "example",
      "title": "example"
    }
  }
}
```
