Skip to main content

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.

danger

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.

info

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

caution

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.

danger

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

The parameters required for the operation of this step are given in the list below with their descriptions.

Variable NameDescriptionStatus
$AC_CACHE_LABELUser 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_DIRSpecifies 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:

Preview of GitHub - appcircleio/appcircle-cache-pull-component