Skip to content

Commit

Permalink
Optionally allow SKC checkout to persist
Browse files Browse the repository at this point in the history
Adds a flag to allow the current copy of kayobe-config to be used,
rather than copying in a clean version.

This is useful if you want to use previously-generated Kolla config
under kayobe-config/etc/kolla
  • Loading branch information
MoteHue committed Oct 10, 2023
1 parent f206267 commit 1fd204f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions functions
Original file line number Diff line number Diff line change
Expand Up @@ -595,11 +595,14 @@ function install_kayobe_venv {
function create_kayobe_environment {
local env=$1
local kayobe_config_source_path=${2:-$KAYOBE_CONFIG_SOURCE_PATH}
local allow_unclean_kayobe_config=${KAYOBE_AUTOMATION_ALLOW_UNCLEAN_KAYOBE_CONFIG:-false}
mkdir -p "$env"/{src/kayobe,src/kayobe-config,venvs/kayobe}

# Ensure we have an unmodified copy of kayobe-config
if [[ $(realpath "$kayobe_config_source_path") != $(realpath "$env/src/kayobe-config") ]]; then
clean_copy "$kayobe_config_source_path" "$env/src/kayobe-config"
if [ "$allow_unclean_kayobe_config" != "true" ]; then
# Ensure we have an unmodified copy of kayobe-config
if [[ $(realpath "$kayobe_config_source_path") != $(realpath "$env/src/kayobe-config") ]]; then
clean_copy "$kayobe_config_source_path" "$env/src/kayobe-config"
fi
fi

if [ -f "$kayobe_config_source_path/requirements.txt" ]; then
Expand Down

0 comments on commit 1fd204f

Please sign in to comment.