0.0.15 • Published 4 years ago

@manhcuong1414/nx-remotecache-s3 v0.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

nx-remotecache-s3

A task runner for @nrwl/nx that uses an Minio Storage as a remote cache. This enables all team members and CI servers to share a single cache. The concept and benefits of computation caching are explained in the NX documentation.

This package was built with nx-remotecache-custom 🙌

Setup

npm install --save-dev nx-remotecache-minio
ParameterDescriptionEnvironment Variable / .envnx.json
Access KeyS3 Access KeyNX_CACHE_S3_ACCESS_KEYaccessKey
Secret KeyS3 Secret KeyNX_CACHE_S3_SECRET_KEYsecretKey
URLConnect to a S3 Storage blob via a single URL.NX_CACHE_S3_URLurl
BucketRequired. Specify S3 bucketNX_CACHE_S3_BUCKETbucket
RegionRequired. Specify the location of the storage e.g. "us-west-1".NX_CACHE_S3_REGIONregion
Fallback branchOptional. In case nx hash not match, fallback to another git branch.NX_CACHE_S3_FALLBACK_BRANCH
Fallback git hashOptional. In case nx hash not match, fallback to a specific git hash.NX_CACHE_S3_FALLBACK_GIT_HASH
{
  "tasksRunnerOptions": {
    "default": {
      "runner": "@manhcuong1414/nx-remotecache-s3",
      "options": {
        "accessKey": "",
        "secretKey": "",
        "url": "",
        "bucket": "nx-cache",
        "region": "us-west-1",
        "cacheableOperations": ["build", "test", "lint", "e2e"]
      }
    }
  }
}

Run it 🚀

Running tasks should now show the storage or retrieval from the remote cache:

Not Found file when use cache PrefixBranchProjectCache
Found file when use cache PrefixBranchProjectLastCache
Downloading file when use cache PrefixBranchProjectLastCache
------------------------------------------------------------------------------
Remote cache hit: S3 Storage
File: a6a64ca4849cee736dda8839bf2576adc889ae2e22c3a8d7e22879b752a9b20d.tar.gz
------------------------------------------------------------------------------

Advanced Configuration

OptionEnvironment Variable / .envDescription
nameNX_CACHE_NAMESet to provide task runner name for logging. Overrides name provided in implementation.
verboseSet to receive full stack traces whenever errors occur. Best used for debugging. Default: false
silentSet to mute success and info logs. Default: false
dotenvSet to false to disable reading .env into process.env. Default: true
dotenvPathSet to read .env files from a different folder.
"tasksRunnerOptions": {
  "default": {
    "options": {
      "name": "My Storage",
      "verbose": true,
      "silent": true
    }
  }
}

Others Custom Runners

RunnerStorage
nx-remotecache-azureAzure Blob Storage
nx-remotecache-minioMinIO Storage
0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.1.30

4 years ago

0.1.26

4 years ago

0.1.25

4 years ago

0.1.24

4 years ago

0.1.23

4 years ago

0.1.22

4 years ago

0.1.21

4 years ago

0.1.20

4 years ago

0.1.19

4 years ago

0.1.18

4 years ago

0.1.17

4 years ago

0.1.16

4 years ago

0.1.15

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago