Deploy without build cache
Deploying without a build cache is a specialized approach required in certain scenarios where the deployment system encounters inconsistencies due to unawareness of specific changes. This is particularly useful when missing styles, uncompiled chunks, or absent installed modules arise.
Why was it needed?
The necessity for deploying without build-cache arises when the deployment system lacks awareness of certain changes within the codebase, leading to discrepancies during the deployment process.
How It Works
With build artifact: By default, when deploying with a build artifact, the system captures the commit ID (Hash) that was last triggered during the deployment. During the code build step, the deployment service compares the differences between the previous and latest commit hash using the following Git command:
Based on the changes and the locations of the modified files, the deployment functionality determines the necessary commands to be executed. This may include actions such as compiling static content or downloading packages. Once the code build is complete, the majority of the codebase is archived and sent to an S3 bucket, referred to as the "artifact."
Without build artifact: If the option is chosen to perform deployment without an artifact, an EMPTY Tree SHA is utilized. In this scenario, the deployment system loads all content from the GitHub repository and performs the same checks. However, since an empty tree SHA is used, all files within the repository are considered, triggering all deployment actions.
Why can't we just do all deployments without building cache?
Building without artifacts for all deployments will result in longer deployment times since it's not always necessary to install vendor
or download packages (npm/yarn) etc.
How to enable deployment without build cache
Navigate to Application Management -> Deployments
Click on the Start Deployment button
Check the Deploy without build caches check box
Last updated