0.0.17 • Published 2 years ago

@manhcuong1414/nx-remotecache-s3 v0.0.17

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.1.30

2 years ago

0.1.26

2 years ago

0.1.25

2 years ago

0.1.24

2 years ago

0.1.23

2 years ago

0.1.22

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.19

2 years ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago