Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.44 KB

File metadata and controls

57 lines (38 loc) · 1.44 KB

@nx-extend/gcp-task-runner

@nx-extend/gcp-task-runner NPM package

Nx plugin to use Cloud Storage as remote cache.

Features

  • Use Google Cloud Storage as Nx remote cache
  • Automatic authentication via Google Cloud credentials
  • Compatible with Nx's caching infrastructure
  • Drop-in replacement for default Nx cache

Setup

Prerequisites

  • Google Cloud project with Cloud Storage enabled
  • Google Cloud credentials configured

Install

npm install -D @nx/gcs-cache@npm:@nx-extend/gcp-task-runner@<latest version>

Usage

Enable task runner

Update your nx.json with the following:

{
  "gcs": {
    "bucket": "your-bucket"
  }
}

Authenticate

The task runner uses @google-cloud/storage which in turn is capable of using the env variable GOOGLE_APPLICATION_CREDENTIALS.

Set this environment variable to point to your service account key file:

export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"

Available Options

Name Type Default Description
bucket string - Name of the Google Cloud Storage bucket to use