Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos and update readme #77

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ steps:
class: STANDARD # Optional. Defaults to empty which is usually STANDARD or based on policy.
args: '--option 1' # Optional. Defaults to empty. Any optional argument that can be passed to aws s3 cp command.
save-cache: true # Optional. Saves the cache on temp folder and keep between builds/jobs on the same machine.
save-cache-dir: /mnt/cache # Optional. Where to save the cache if `save-cache` is enabled.
paths:
- 'bundle/vendor'
```
Expand Down Expand Up @@ -517,6 +518,7 @@ steps:
s3:
bucket: s3-bucket
save-cache: true # Optional. Saves the cache on temp folder and keep between builds/jobs on the same machine. Defaults to `false`
save-cache-dir: /mnt/cache # Optional. Where to save the cache if `save-cache` is enabled.
paths:
- bundle/vendor
```
Expand Down
6 changes: 3 additions & 3 deletions lib/backends/s3.bash
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ function restore() {

# Check if prefere local is true and if tar file exists in tmp dir
if [ "${BK_CACHE_SAVE_CACHE}" == "true" ] && [ -f "${BK_CACHE_LOCAL_PATH}/${TAR_FILE}" ]; then
echo -e "${BK_LOG_PREFIX}:file_cabinet: Using previously downloaded file ${BK_CACHE_LOCAL_PATH}/${TAR_FILE} since local is prefered."
echo -e "${BK_LOG_PREFIX}🗄️ Using previously downloaded file ${BK_CACHE_LOCAL_PATH}/${TAR_FILE} since local is preferred."
if tar ${BK_TAR_EXTRACT_ARGS} "${BK_CACHE_LOCAL_PATH}/${TAR_FILE}" -C . ; then
return
fi
echo -e "${BK_LOG_PREFIX}:file_cabinet: Ignoring corrupted previously downloaded file ${BK_CACHE_LOCAL_PATH}/${TAR_FILE}."
echo -e "${BK_LOG_PREFIX}🗄️ Ignoring corrupted previously downloaded file ${BK_CACHE_LOCAL_PATH}/${TAR_FILE}."
fi

aws s3api head-object --bucket "${BUILDKITE_PLUGIN_CACHE_S3_BUCKET}" --key "${TKEY}/${TAR_FILE}" ${BK_DEFAULT_AWS_ARGS} || no_head=true
Expand Down Expand Up @@ -149,7 +149,7 @@ function cache() {
cache_locating "${TAR_TARGETS}"

if [ $BK_ALWAYS_CACHE == "true" ]; then
echo -e "${BK_LOG_PREFIX}:file_cabinet::close: Removing previously found cache ${TAR_FILE} since always is true."
echo -e "${BK_LOG_PREFIX}🗄️🗑️ Removing previously found cache ${TAR_FILE} since always is true."
rm -f "${TAR_FILE}"
fi

Expand Down
2 changes: 1 addition & 1 deletion lib/backends/tarball.bash
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function cache() {
TAR_FILE="${CACHE_PREFIX}/${CACHE_KEY}.${BK_TAR_EXTENSION}"

if [ $BK_ALWAYS_CACHE == "true" ]; then
echo -e "${BK_LOG_PREFIX}:file_cabinet::close: Removing previously found cache ${TAR_FILE} since always is true."
echo -e "${BK_LOG_PREFIX}🗄️🗑️ Removing previously found cache ${TAR_FILE} since always is true."
rm -f "${TAR_FILE}"
fi

Expand Down
Loading