> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# workshop64/buildpulse

Send test results to BuildPulse (https://buildpulse.io) to help you identify and eliminate flaky tests.


## Commands

### restore_cache

Restore a file or directory from BuildPulse Cache

| Parameter | Type | Default | Description |
|---|---|---|---|
| `fail_on_cache_miss` | boolean | false | The key to use when restoring the cache. This key should be unique to the
files or directories being restored.
 |
| `key` | string |  | The key to use when restoring the cache. This key should be unique to the
files or directories being restored.
 |
| `paths` | string |  | Space-separated paths to files or directories to save to the cache.
 |

### save_cache

Save a file or directory to BuildPulse Cache

| Parameter | Type | Default | Description |
|---|---|---|---|
| `key` | string |  | The key to use when saving the cache. This key should be unique to the
files or directories being saved.
 |
| `paths` | string |  | Space-separated paths to files or directories to save to the cache.
 |
| `upload_chunk_size` | integer | 33554432 | The maximum size of each chunk of the file to upload to the cache.
 |

### setup

Deprecated. This command is no longer needed and no longer used. It will be removed in an upcoming release.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `access-key-id` | env_var_name | BUILDPULSE_ACCESS_KEY_ID | Deprecated. This parameter is no longer needed and no longer used. |
| `secret-access-key` | env_var_name | BUILDPULSE_SECRET_ACCESS_KEY | Deprecated. This parameter is no longer needed and no longer used. |

### upload

Send test results to BuildPulse.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `access-key-id` | env_var_name | BUILDPULSE_ACCESS_KEY_ID | BuildPulse access key ID. Set this to the name of the environment
variable you will use to hold this value
(e.g., BUILDPULSE_ACCESS_KEY_ID).
 |
| `account-id` | integer | -1 | BuildPulse's unique identifier for the account that owns the
repository.

You can specify the account ID using this parameter or by setting
the BUILDPULSE_ACCOUNT_ID environment variable. If the parameter
is specified and the environment variable is set, the parameter takes
precedence.
 |
| `coverage-files` | string |  | Paths to coverage files (space-separated).
 |
| `path` | string |  | Relative path to the directory that contains the XML files for the
test results (e.g., "test/reports").
 |
| `repository-id` | integer | -1 | BuildPulse's unique identifier for the repository.

You can specify the repository ID using this parameter or by setting
the BUILDPULSE_REPOSITORY_ID environment variable. If the parameter
is specified and the environment variable is set, the parameter takes
precedence.
 |
| `repository-path` | string | . | Path to the local git clone of the repository (default: ".").
 |
| `secret-access-key` | env_var_name | BUILDPULSE_SECRET_ACCESS_KEY | BuildPulse secret access key. Set this to the name of the environment
variable you will use to hold this value
(e.g., BUILDPULSE_SECRET_ACCESS_KEY).
 |
| `tags` | string |  | Tags to apply to this build (space-separated).
 |
| `when-branch-matches` | string | .* | By default, test results are always uploaded, regardless of the current branch. To configure BuildPulse to only upload results for certain branches, specify a regular expression to identify branch names for the branches that should have their test results uploaded. |

## Examples

### send-test-results-to-buildpulse

Easily send your test results to BuildPulse in your jobs.

```yaml
version: '2.1'
orbs:
  buildpulse: workshop64/buildpulse@x.y
jobs:
  build:
    docker:
      - image: circleci/<some-docker-image>
    steps:
      - checkout
      - run: echo "Run your tests and generate XML reports for your test results"
      - buildpulse/upload:
          account-id: <buildpulse-account-id>
          path: test/reports
          repository-id: <buildpulse-repository-id>
workflows:
  commit:
    jobs:
      - build
  version: 2
```