# ci-parallel-vars

> Get CI environment variables for parallelizing builds

Latest version **1.0.1** (published 2020-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install ci-parallel-vars
pnpm add ci-parallel-vars
yarn add ci-parallel-vars
bun add ci-parallel-vars
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-06-18 |
| First published | 2018-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 38 |
| Author | Jamie Kyle |
| Maintainers | thejameskyle |
| Keywords | ci, env, vars, index, total, parallel, builds, tests, travis, circle, buildkite, bitbucket, pipelines, knapsack |

## Links

- npm: https://www.npmjs.com/package/ci-parallel-vars
- Repository: https://github.com/jamiebuilds/ci-parallel-vars
- Homepage: https://github.com/jamiebuilds/ci-parallel-vars#readme
- Issues: https://github.com/jamiebuilds/ci-parallel-vars/issues
- npm.io page: https://npm.io/package/ci-parallel-vars

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-06-18
- 1.0.0 — 2018-05-25

## README

# ci-parallel-vars

> Get CI environment variables for parallelizing builds

## Install

```
yarn add ci-parallel-vars
```

## Usage

```js
const ciParallelVars = require('ci-parallel-vars');

console.log(ciParallelVars); // { index: 3, total: 10 } || null
```

## Supports

> If you want to add support for another pair, please open a pull request and
> add them to `index.js` and to this list.

- [Knapsack] / [TravisCI] / [GitLab] - `CI_NODE_INDEX`/`CI_NODE_TOTAL`
- [CircleCI] - `CIRCLE_NODE_INDEX`/`CIRCLE_NODE_TOTAL`
- [Bitbucket Pipelines] - `BITBUCKET_PARALLEL_STEP`/`BITBUCKET_PARALLEL_STEP_COUNT`
- [Buildkite] - `BUILDKITE_PARALLEL_JOB`/`BUILDKITE_PARALLEL_JOB_COUNT`
- [Semaphore] - `SEMAPHORE_CURRENT_JOB`/`SEMAPHORE_JOB_COUNT`

One of these pairs must both be defined as numbers or `ci-parallel-vars` will
be `null`.

[Knapsack]: http://docs.knapsackpro.com/ruby/knapsack#info-about-env-variables
[TravisCI]: https://docs.travis-ci.com/user/speeding-up-the-build/#Parallelizing-RSpec%2C-Cucumber-and-Minitest-on-multiple-VMs
[GitLab]: https://docs.gitlab.com/ee/ci/yaml/#parallel
[CircleCI]: https://circleci.com/docs/1.0/parallel-manual-setup/#using-environment-variables
[Bitbucket Pipelines]: https://confluence.atlassian.com/bitbucket/parallel-steps-946606807.html
[Buildkite]: https://buildkite.com/docs/builds/parallel-builds
[Semaphore]: https://semaphoreci.com/docs/available-environment-variables.html#variables-exported-in-builds-and-deploys

---
_Source: https://npm.io/package/ci-parallel-vars · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
