diff --git a/docs/external-generated/packages-metadata.json b/docs/external-generated/packages-metadata.json index 6d98bc4d5a..9bcf257660 100644 --- a/docs/external-generated/packages-metadata.json +++ b/docs/external-generated/packages-metadata.json @@ -189,17 +189,7 @@ } ], "executors": [], - "generators": [ - { - "description": "Initialize the S3 Cache", - "file": "external-generated/packages/powerpack-s3-cache/generators/init.json", - "hidden": false, - "name": "init", - "originalFilePath": "/libs/nx-packages/powerpack-s3-cache/src/generators/init/schema.json", - "path": "powerpack-s3-cache/generators/init", - "type": "generator" - } - ], + "generators": [], "githubRoot": "https://github.com/nrwl/nx/blob/master", "name": "powerpack-s3-cache", "packageName": "@nx/powerpack-s3-cache", diff --git a/docs/external-generated/packages/powerpack-azure-cache/documents/overview.md b/docs/external-generated/packages/powerpack-azure-cache/documents/overview.md index 1663e7ae2b..69531baf02 100644 --- a/docs/external-generated/packages/powerpack-azure-cache/documents/overview.md +++ b/docs/external-generated/packages/powerpack-azure-cache/documents/overview.md @@ -81,3 +81,29 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `contain | --------------- | -------------------------------- | | **container** | The name of the container to use | | **accountName** | The name of blob storage account | + +# Cache Modes + +By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache. + +Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file. + +```jsonc {% fileName="nx.json" %} +{ + "azure": { + // ... + "localMode": "read-only" + } +} +``` + +The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment. + +```jsonc {% fileName="nx.json" %} +{ + "azure": { + // ... + "ciMode": "read-only" + } +} +``` diff --git a/docs/external-generated/packages/powerpack-gcs-cache/documents/overview.md b/docs/external-generated/packages/powerpack-gcs-cache/documents/overview.md index 2212c9ac99..86fe8dc775 100644 --- a/docs/external-generated/packages/powerpack-gcs-cache/documents/overview.md +++ b/docs/external-generated/packages/powerpack-gcs-cache/documents/overview.md @@ -80,3 +80,29 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `bucket` | **Property** | **Description** | | ------------ | ----------------------------- | | **bucket** | The name of the bucket to use | + +# Cache Modes + +By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache. + +Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file. + +```jsonc {% fileName="nx.json" %} +{ + "gcs": { + // ... + "localMode": "read-only" + } +} +``` + +The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment. + +```jsonc {% fileName="nx.json" %} +{ + "gcs": { + // ... + "ciMode": "read-only" + } +} +``` diff --git a/docs/external-generated/packages/powerpack-s3-cache/documents/overview.md b/docs/external-generated/packages/powerpack-s3-cache/documents/overview.md index dafde4ab80..29395a60ff 100644 --- a/docs/external-generated/packages/powerpack-s3-cache/documents/overview.md +++ b/docs/external-generated/packages/powerpack-s3-cache/documents/overview.md @@ -152,3 +152,31 @@ Below is an example on how to connect to MinIO: | **endpoint** | The custom endpoint to upload artifacts to. If endpoint is not defined, the default AWS endpoint is used | | **accessKeyId** | AWS Access Key ID (optional if `AWS_ACCESS_KEY_ID` is set in the environment) | | **secretAccessKey** | AWS secret access key (optional if `AWS_SECRET_ACCESS_KEY` is set in the environment) | + +# Cache Modes + +By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache. + +Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file. + +```jsonc {% fileName="nx.json" %} +{ + "s3": { + "region": "us-east-1", + "bucket": "my-bucket", + "localMode": "read-only" + } +} +``` + +The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment. + +```jsonc {% fileName="nx.json" %} +{ + "s3": { + "region": "us-east-1", + "bucket": "my-bucket", + "ciMode": "read-only" + } +} +``` diff --git a/docs/generated/manifests/menus.json b/docs/generated/manifests/menus.json index 7cb7776179..227665bc83 100644 --- a/docs/generated/manifests/menus.json +++ b/docs/generated/manifests/menus.json @@ -10980,23 +10980,6 @@ ], "isExternal": false, "disableCollapsible": false - }, - { - "id": "generators", - "path": "/nx-api/powerpack-s3-cache/generators", - "name": "generators", - "children": [ - { - "id": "init", - "path": "/nx-api/powerpack-s3-cache/generators/init", - "name": "init", - "children": [], - "isExternal": false, - "disableCollapsible": false - } - ], - "isExternal": false, - "disableCollapsible": false } ], "isExternal": false, diff --git a/docs/generated/manifests/nx-api.json b/docs/generated/manifests/nx-api.json index 46af109727..c3c93c5202 100644 --- a/docs/generated/manifests/nx-api.json +++ b/docs/generated/manifests/nx-api.json @@ -3868,17 +3868,7 @@ "root": "/libs/nx-packages/powerpack-s3-cache", "source": "/libs/nx-packages/powerpack-s3-cache/src", "executors": {}, - "generators": { - "/nx-api/powerpack-s3-cache/generators/init": { - "description": "Initialize the S3 Cache", - "file": "external-generated/packages/powerpack-s3-cache/generators/init.json", - "hidden": false, - "name": "init", - "originalFilePath": "/libs/nx-packages/powerpack-s3-cache/src/generators/init/schema.json", - "path": "/nx-api/powerpack-s3-cache/generators/init", - "type": "generator" - } - }, + "generators": {}, "path": "/nx-api/powerpack-s3-cache" }, "powerpack-shared-fs-cache": { diff --git a/docs/shared/packages/powerpack-azure-cache/powerpack-azure-cache-plugin.md b/docs/shared/packages/powerpack-azure-cache/powerpack-azure-cache-plugin.md index 1663e7ae2b..69531baf02 100644 --- a/docs/shared/packages/powerpack-azure-cache/powerpack-azure-cache-plugin.md +++ b/docs/shared/packages/powerpack-azure-cache/powerpack-azure-cache-plugin.md @@ -81,3 +81,29 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `contain | --------------- | -------------------------------- | | **container** | The name of the container to use | | **accountName** | The name of blob storage account | + +# Cache Modes + +By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache. + +Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file. + +```jsonc {% fileName="nx.json" %} +{ + "azure": { + // ... + "localMode": "read-only" + } +} +``` + +The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment. + +```jsonc {% fileName="nx.json" %} +{ + "azure": { + // ... + "ciMode": "read-only" + } +} +``` diff --git a/docs/shared/packages/powerpack-gcs-cache/powerpack-gcs-cache-plugin.md b/docs/shared/packages/powerpack-gcs-cache/powerpack-gcs-cache-plugin.md index 2212c9ac99..86fe8dc775 100644 --- a/docs/shared/packages/powerpack-gcs-cache/powerpack-gcs-cache-plugin.md +++ b/docs/shared/packages/powerpack-gcs-cache/powerpack-gcs-cache-plugin.md @@ -80,3 +80,29 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `bucket` | **Property** | **Description** | | ------------ | ----------------------------- | | **bucket** | The name of the bucket to use | + +# Cache Modes + +By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache. + +Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file. + +```jsonc {% fileName="nx.json" %} +{ + "gcs": { + // ... + "localMode": "read-only" + } +} +``` + +The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment. + +```jsonc {% fileName="nx.json" %} +{ + "gcs": { + // ... + "ciMode": "read-only" + } +} +``` diff --git a/docs/shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin.md b/docs/shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin.md index dafde4ab80..29395a60ff 100644 --- a/docs/shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin.md +++ b/docs/shared/packages/powerpack-s3-cache/powerpack-s3-cache-plugin.md @@ -152,3 +152,31 @@ Below is an example on how to connect to MinIO: | **endpoint** | The custom endpoint to upload artifacts to. If endpoint is not defined, the default AWS endpoint is used | | **accessKeyId** | AWS Access Key ID (optional if `AWS_ACCESS_KEY_ID` is set in the environment) | | **secretAccessKey** | AWS secret access key (optional if `AWS_SECRET_ACCESS_KEY` is set in the environment) | + +# Cache Modes + +By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache. + +Nx will only show warnings when the remote cache is not writable. You can disable these warnings by setting `localMode` to `read-only` or `no-cache` in the `nx.json` file. + +```jsonc {% fileName="nx.json" %} +{ + "s3": { + "region": "us-east-1", + "bucket": "my-bucket", + "localMode": "read-only" + } +} +``` + +The cache mode in CI can also be configured by setting `ciMode` to `read-only` or `no-cache` in the `nx.json` file. Or setting `NX_POWERPACK_CACHE_MODE` to `read-only` or `no-cache` in the CI environment. + +```jsonc {% fileName="nx.json" %} +{ + "s3": { + "region": "us-east-1", + "bucket": "my-bucket", + "ciMode": "read-only" + } +} +``` diff --git a/docs/shared/reference/environment-variables.md b/docs/shared/reference/environment-variables.md index 8541758ec8..24abbfb0f2 100644 --- a/docs/shared/reference/environment-variables.md +++ b/docs/shared/reference/environment-variables.md @@ -17,7 +17,10 @@ The following environment variables are ones that you can set to change the beha | NX_WORKSPACE_DATA_DIRECTORY | string | The project graph cache and some other internal nx caches are stored in `.nx/workspace-data` by default. Set this variable to use a different directory. | | NX_PARALLEL | number | The number of tasks Nx should run in parallel. Overrides any configured value inside nx.json | | NX_RUNNER | string | The name of task runner from the config to use. Can be overridden on the command line with `--runner`. Not read if `NX_TASKS_RUNNER` is set. | -| NX_SKIP_NX_CACHE | boolean | Rerun the tasks even when the results are available in the cache | +| NX_SKIP_NX_CACHE | boolean | Rerun the tasks even when the results are available in the cache. | +| NX_DISABLE_NX_CACHE | boolean | Rerun the tasks even when the results are available in the cache. | +| NX_SKIP_REMOTE_CACHE | boolean | Disable all remote caching features. This means that the remote cache will not be read from or written to. Includes Nx Cloud and Powerpack Caches. | +| NX_DISABLE_REMOTE_CACHE | boolean | Disable all remote caching features. This means that the remote cache will not be read from or written to. Includes Nx Cloud and Powerpack Caches. | | NX_TASKS_RUNNER | string | The name of task runner from the config to use. Can be overridden on the command line with `--runner`. Preferred over `NX_RUNNER`. | | NX_TASKS_RUNNER_DYNAMIC_OUTPUT | boolean | If set to `false`, will use non-dynamic terminal output strategy (what you see in CI), even when you terminal can support the dynamic version | | NX_VERBOSE_LOGGING | boolean | If set to `true`, will print debug information useful for troubleshooting | diff --git a/docs/shared/reference/sitemap.md b/docs/shared/reference/sitemap.md index c6323f0e04..b81ccc0632 100644 --- a/docs/shared/reference/sitemap.md +++ b/docs/shared/reference/sitemap.md @@ -814,8 +814,6 @@ - [powerpack-s3-cache](/nx-api/powerpack-s3-cache) - [documents](/nx-api/powerpack-s3-cache/documents) - [Overview](/nx-api/powerpack-s3-cache/documents/overview) - - [generators](/nx-api/powerpack-s3-cache/generators) - - [init](/nx-api/powerpack-s3-cache/generators/init) - [powerpack-shared-fs-cache](/nx-api/powerpack-shared-fs-cache) - [documents](/nx-api/powerpack-shared-fs-cache/documents) - [Overview](/nx-api/powerpack-shared-fs-cache/documents/overview)