mirror of
https://github.com/drillster/drone-volume-cache.git
synced 2026-06-04 18:24:02 +08:00
Merge pull request #7 from macropin/master
Fix selinux compatibility: do not try to copy selinux ACLS
This commit is contained in:
@@ -25,7 +25,7 @@ if [[ -n "$PLUGIN_REBUILD" && "$PLUGIN_REBUILD" == "true" ]]; then
|
||||
if [ -d "$source" ]; then
|
||||
echo "Rebuilding cache for $source..."
|
||||
mkdir -p "/cache/$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$DRONE_JOB_NUMBER/$source" && \
|
||||
rsync -aHAX --delete "$source/" "/cache/$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$DRONE_JOB_NUMBER/$source"
|
||||
rsync -aHA --delete "$source/" "/cache/$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$DRONE_JOB_NUMBER/$source"
|
||||
else
|
||||
echo "$source does not exist, removing from cached folder..."
|
||||
rm -rf "/cache/$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$DRONE_JOB_NUMBER/$source"
|
||||
@@ -37,7 +37,7 @@ elif [[ -n "$PLUGIN_RESTORE" && "$PLUGIN_RESTORE" == "true" ]]; then
|
||||
if [ -d "/cache/$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$DRONE_JOB_NUMBER/$source" ]; then
|
||||
echo "Restoring cache for $source..."
|
||||
mkdir -p "$source" && \
|
||||
rsync -aHAX --delete "/cache/$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$DRONE_JOB_NUMBER/$source/" "$source"
|
||||
rsync -aHA --delete "/cache/$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$DRONE_JOB_NUMBER/$source/" "$source"
|
||||
else
|
||||
echo "No cache for $source"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user