From 6cebe03cca77fb471c2645f5db64713521746226 Mon Sep 17 00:00:00 2001 From: David Legrand <1110600+davlgd@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:24:22 +0100 Subject: [PATCH 1/2] Add references to CC_DISABLE_BUILD_CACHE_UPLOAD --- content/doc/administrate/apps-management.md | 4 ++++ content/doc/develop/build-hooks.md | 4 ++++ content/doc/develop/env-variables.md | 3 +++ content/doc/reference/reference-environment-variables.md | 1 + 4 files changed, 12 insertions(+) diff --git a/content/doc/administrate/apps-management.md b/content/doc/administrate/apps-management.md index 0fc867dd..de2c7f59 100644 --- a/content/doc/administrate/apps-management.md +++ b/content/doc/administrate/apps-management.md @@ -28,6 +28,10 @@ Stop functionality is useful during the development of the application to limit {{< imgproc link="/" caption="Manage your application" image="/images/app-management.png" method="resize" options="900x q80 webp">}} {{< /img-grid >}} +{{< callout type="info" >}} + If you set `CC_DISABLE_BUILD_CACHE_UPLOAD` environment variable to `true`, the cache archive won't be created nor uploaded. +{{< /callout >}} + ## Deploy an old commit If you want to revert to a previous version of your code, you can go to the **Activity** menu of your application in the Clever Cloud console. You will find here all your previous commits. Just select **redeploy this commit** on the desired one. This will trigger a redeploy of your application at this version. diff --git a/content/doc/develop/build-hooks.md b/content/doc/develop/build-hooks.md index a9605849..f55f4eca 100644 --- a/content/doc/develop/build-hooks.md +++ b/content/doc/develop/build-hooks.md @@ -90,6 +90,10 @@ This hook is perfect for: - extra build steps that you want to cache (eg bundling your frontend assets) +{{< callout type="info" >}} + If you set `CC_DISABLE_BUILD_CACHE_UPLOAD` environment variable to `true`, the cache archive won't be created nor uploaded. +{{< /callout >}} + ### Pre Run **By using `CC_PRE_RUN_HOOK`.** diff --git a/content/doc/develop/env-variables.md b/content/doc/develop/env-variables.md index 98edd61d..e2679534 100644 --- a/content/doc/develop/env-variables.md +++ b/content/doc/develop/env-variables.md @@ -79,6 +79,9 @@ It's handy if you want to only run crons on 1 instance (e.g. only on instance 0) We use environment variables for some settings: +* `CC_DISABLE_BUILD_CACHE_UPLOAD`: allows you to ask that the cache archive is neither + created nor uploaded after the build process. Thus, restarts won't be speeded up, + as the build process will be launched each time. * `IGNORE_FROM_BUILDCACHE`: allows you to specify paths to ignore when the build cache archive is created. Must be relative to your application root. (e.g. `foo/bar:foo/baz` where `bar` or `baz` can be either a directory or a file) diff --git a/content/doc/reference/reference-environment-variables.md b/content/doc/reference/reference-environment-variables.md index b813ca78..a3a42538 100644 --- a/content/doc/reference/reference-environment-variables.md +++ b/content/doc/reference/reference-environment-variables.md @@ -54,6 +54,7 @@ So you can alter the build&start process for your application. | Name | Description | Default value | |-----------------------|------------------------------|--------------------------------| |`CC_CACHE_DEPENDENCIES` | Enable caching of your build dependencies to speed up following builds. | false | +|[`CC_DISABLE_BUILD_CACHE_UPLOAD`](/doc/develop/env-variables/#settings-you-can-define-using-environment-variables "Settings you can define using environment variables") | Disable creation and upload of cache archive. Restarts won't be speeded up. | `false` | |[`CC_IGNORE_FROM_BUILDCACHE`](/doc/develop/env-variables/#settings-you-can-define-using-environment-variables "Settings you can define using environment variables") | Allows to specify paths to ignore when the build cache archive is created. | | |[`IGNORE_FROM_BUILDCACHE`](/doc/develop/env-variables/#settings-you-can-define-using-environment-variables "Settings you can define using environment variables") | (Deprecated) Allows to specify paths to ignore when the build cache archive is created. | | |[`CC_OVERRIDE_BUILDCACHE`](/doc/develop/env-variables/#settings-you-can-define-using-environment-variables "Settings you can define using environment variables") | Allows to specify paths that will be in the build cache. Only those files / directories will be cached | | From 25246deeda6096841614318f382360d7154b29cc Mon Sep 17 00:00:00 2001 From: David Legrand <1110600+davlgd@users.noreply.github.com> Date: Wed, 10 Jan 2024 18:33:33 +0100 Subject: [PATCH 2/2] Fixes after review --- content/doc/administrate/apps-management.md | 2 +- content/doc/develop/build-hooks.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/doc/administrate/apps-management.md b/content/doc/administrate/apps-management.md index de2c7f59..ee5baf73 100644 --- a/content/doc/administrate/apps-management.md +++ b/content/doc/administrate/apps-management.md @@ -29,7 +29,7 @@ Stop functionality is useful during the development of the application to limit {{< /img-grid >}} {{< callout type="info" >}} - If you set `CC_DISABLE_BUILD_CACHE_UPLOAD` environment variable to `true`, the cache archive won't be created nor uploaded. + If you set [`CC_DISABLE_BUILD_CACHE_UPLOAD`](/doc/develop/env-variables/#settings-you-can-define-using-environment-variables) environment variable to `true`, the cache archive won't be created nor uploaded. {{< /callout >}} ## Deploy an old commit diff --git a/content/doc/develop/build-hooks.md b/content/doc/develop/build-hooks.md index f55f4eca..dcd8c2c6 100644 --- a/content/doc/develop/build-hooks.md +++ b/content/doc/develop/build-hooks.md @@ -91,7 +91,7 @@ This hook is perfect for: - extra build steps that you want to cache (eg bundling your frontend assets) {{< callout type="info" >}} - If you set `CC_DISABLE_BUILD_CACHE_UPLOAD` environment variable to `true`, the cache archive won't be created nor uploaded. + If you set [`CC_DISABLE_BUILD_CACHE_UPLOAD`](/doc/develop/env-variables/#settings-you-can-define-using-environment-variables) environment variable to `true`, the cache archive won't be created nor uploaded. {{< /callout >}} ### Pre Run