Skip to content

Commit

Permalink
Always consider absolute path /kpa in kpa.sh
Browse files Browse the repository at this point in the history
In some cases, especially in CI runs, we must ensure to be on the /kpa
directory, ans so using absoule paths should do the trick.
  • Loading branch information
rascasoft committed Aug 3, 2023
1 parent 209f327 commit a67d8cf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions kpa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ while [ "x$1" != "x" ]; do
KPA_PROJECT=$2
shift
# Check settings file
if [ ! -f "projects/${KPA_PROJECT}/common/settings.yml" ]
if [ ! -f "/kpa/projects/${KPA_PROJECT}/common/settings.yml" ]
then
echo "A setting.yml file must exists under projects/${KPA_PROJECT}/common/!"
echo "A settings.yml file must exists under /kpa/projects/${KPA_PROJECT}/common/!"
echo ""
usage
exit 1
Expand All @@ -49,9 +49,9 @@ while [ "x$1" != "x" ]; do
KPA_YML=$2
shift
# Check kpa yaml
if [ ! -f "projects/${KPA_PROJECT}/${KPA_YML}" ]
if [ ! -f "/kpa/projects/${KPA_PROJECT}/${KPA_YML}" ]
then
echo "Unable to get projects/${KPA_PROJECT}/${KPA_YML} file!"
echo "Unable to get /kpa/projects/${KPA_PROJECT}/${KPA_YML} file!"
echo ""
usage
exit 1
Expand Down Expand Up @@ -108,9 +108,9 @@ export ANSIBLE_INVENTORY_UNPARSED_WARNING=False
export ANSIBLE_LOCALHOST_WARNING=False

ANSIBLE_COMMAND="ansible-playbook ${ANSIBLE_VERBOSE}
-e @projects/${KPA_PROJECT}/common/settings.yml
-e @projects/${KPA_PROJECT}/${KPA_YML}
playbooks/kpa_generator.yml"
-e @/kpa/projects/${KPA_PROJECT}/common/settings.yml
-e @/kpa/projects/${KPA_PROJECT}/${KPA_YML}
/kpa/playbooks/kpa_generator.yml"

[ "x${ANSIBLE_VERBOSE}" == "x" ] && ${ANSIBLE_COMMAND} &> /dev/null || ${ANSIBLE_COMMAND}

Expand Down

0 comments on commit a67d8cf

Please sign in to comment.