Cache Pull
Cache Push uploads the cache archive file to a remote location, as we explained in detail in the Cache Push step. On the other hand, Cache Pull downloads and extracts that archive file in the build pipeline, restoring all files and folders to their original locations.
Cache Push and Cache Pull components should work in coordination on the same cache file. Therefore, to download the pushed cache, the Cache Pull must have the same cache label as the Cache Push.
If you need to use the cached folder in a different branch or a separate project, you have the capability to modify the values of $AC_GIT_BRANCH
or $AC_BUILD_PROFILE_ID
. For further information, please check out the following documentation:
These variables can be adjusted within the cache label field, as indicated by the red highlight in the accompanying image. Simply replace them with the branch or project ID that corresponds to your intended usage.
Prerequisites
There are no prerequisites required before using the Cache Pull step.
This component does not require any prerequisite steps for operation. The only thing necessary for the component to work as expected is to utilize the cached files before the step in which they will be used. Additionally, an important prerequisite for this step to function properly is that the files to be used must have been cached in previous builds.
For example, in the screenshot, to use cached files for Cocoapods, the Cache Pull step should be used before the Cocoapods Install step.
If there are no previously cached files and you attempt to use this step, the Cache Pull step will result in a not found error
because it cannot locate the specified files at the remote location.
Input Variables
This step contains some input variable(s). It needs these variable(s) to work. The table below gives explanation for this variable(s).
Variable Name | Description | Status |
---|---|---|
$AC_CACHE_LABEL | User defined cache label to identify one cache from others. Both Cache Push and Cache Pull steps should have the same value to match. | Required |
$AC_REPOSITORY_DIR | Specifies the cloned repository path. This path will be generated after running the Git Clone step. | Optional |
To access the source code of this component, please use the following link: