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 git dependencies with salt 3005.5+ and 3006.6+ #349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions lib/kitchen/provisioner/formula-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function linkFormulas() {
do
name=$(basename "$formula")
if [[ ! -L "$SALT_ROOT/$name" ]]; then
ln -fs "$formula/$name" "$SALT_ROOT/$name"
# Using plain copy instead of symlink because salt 3005.5+ refuse to serve files outside of files_root
cp -r "$formula/$name" "$SALT_ROOT/$name"
fi
find "$formula" -maxdepth 1 -mindepth 1 -type d |grep -E "_(modules|states|grains|renderers|returners)" | xargs -I{} \
basename {}| xargs -I{} cp -rs "$formula"/{} "$SALT_ROOT"/
Expand All @@ -83,7 +84,7 @@ function linkFormulas() {

# form pkgs
find "$SALT_ENV" -maxdepth 1 -mindepth 1 -path "*_formulas*" -prune -o -name "*" -type d -print0| xargs -I{} -0 -n1 --no-run-if-empty basename {} | xargs -I{} --no-run-if-empty \
ln -fs "$SALT_ENV"/{} "$SALT_ROOT"/{};
cp -r "$SALT_ENV"/{} "$SALT_ROOT"/{};
fi

}
Expand Down