19.0.4 • Published 10 months ago

nx-remotecache-ali-oss v19.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

nx-remotecache-ali-oss

This is a remote caching solution for @nrwl/nx using AliCloud Object Storage.

Description

This package allows all team members and CI servers to share a single cache, improving build times and reducing resource usage. It is built with nx-remotecache-custom.

Compatibility

This package is compatible with Nx versions 16.9.0 and above.

Setup

Install the package as a dev dependency:

npm install --save-dev nx-remotecache-ali-oss

Configuration

You can configure the package using environment variables or the nx.json file. Here are the available options:

ParameterDescription Environment Variable / .envnx.json
Access KeyConnect to an AliCloud Object Storage blob via a single URL.NXCACHE_ALI_OSS_ACCESS_KEYaccessKeyId
Access Secret KeyUse together with Account Key for AliCloud Credentials AuthenticationNXCACHE_ALI_OSS_ACCESS_KEY_SECRETaccessKeySecret
BucketRequired. Specify which container should be used for storing the cache.NXCACHE_ALI_OSS_BUCKETbucket
RegionOptional. Specify the location of the storage e.g. "us-west-1".NXCACHE_ALI_OSS_REGIONregion
FilePrefixOptional. Adding file prefix before the filename.NXCACHE_ALI_OSS_FILE_PREFIXfilePrefix

Usage

You can use this package as the default task runner in your nx.json file:

{
  "tasksRunnerOptions": {
    "default": {
      "runner": "nx-remotecache-ali-oss",
      "options": {
        "accessKeyId": "your-access-key",
        "accessKeySecret": "your-secret-key",
        "bucket": "your-bucket",
        "region": "your-region", // optional
        "filePrefix": "cache", // optional
        "cacheableOperations": ["build", "test", "lint", "e2e"]
      }
    }
  }
}
19.0.3

10 months ago

19.0.4

10 months ago

19.0.2

1 year ago

19.0.1

1 year ago

19.0.0

1 year ago