open-index/open-npm huggingface dataset:
npm package: @pch-ng/builder
Description: Common build scripts
Author: Marius-Remus Mate
Latest version: 0.2.6

# PCH builder

Install with

```sh
yarn add @pch-ng/builder
```

It provides three npm commands:

## `ci-build`

Builds the Docker image and pushes it to the *propertyconnect* Quay.io Docker registry. Also adds a git tag and pushes it, so a SSH key with write access must be supplied.

Required env vars:

- `CIRCLE_PROJECT_REPONAME` (provided by Circle CI)
- `CIRCLE_BUILD_NUM` (provided by Circle CI)
- `CIRCLE_BRANCH` (provided by Circle CI)
- `QUAYIO_USER`
- `QUAYIO_PASSWORD`

## `ci-trigger-deploy`

Triggers the `deploy` task on Circle CI. The deployment will be done with the tag created by [`ci-build`](#ci-build).

Required env vars:

- `CIRCLE_PROJECT_USERNAME` (provided by Circle CI)
- `CIRCLE_PROJECT_REPONAME` (provided by Circle CI)
- `CIRCLE_BUILD_NUM` (provided by Circle CI)
- `CIRCLE_BRANCH` (provided by Circle CI)
- `CIRCLE_SHA1` (provided by Circle CI)
- `CIRCLE_API_TOKEN` — API token which allows the script to trigger a build

## `ci-deploy`

Upgrades a service on Rancher. Is triggered by [`ci-trigger-deploy`](#ci-trigger-deploy) with the Docker image tag to deploy.

Required env vars:

- `CIRCLE_PROJECT_REPONAME` (provided by Circle CI)
- `RANCHER_API_URL`
- `RANCHER_ENV` — Rancher environment identifier (e.g. `1a5`)
- `RANCHER_SERVICE` — Rancher service identifier (e.g. `1s12`)
- `TAG_TO_DEPLOY` (provided by [`ci-trigger-deploy`](#ci-trigger-deploy), defaults to `master` if not set)