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

feat: [KTD-3526] support relative path for pit command #29

Merged
merged 1 commit into from
May 9, 2024
Merged
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
16 changes: 15 additions & 1 deletion k8s-deployer/scripts/start-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
# 7. Test session id
# 8. Git username
# 9. Git user email
# 10. Parameter DO_NOT_CREATE_PROJECT_DIR: value either "true" or "false"
# - xyz: stands for any folder name which is going to run pit project after all files get copied from remote places by rsync command
# - xyz/ci-home: is a folder name which represents as pit project current workspace
# - "true": stands for creating project directory under xyz/ci-home folder is not required
# - "false": stands for creating project directory under xyz/ci-home folder is required
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

echo "Starting k8s-deployer application..."
Expand All @@ -38,6 +43,8 @@ TEST_SESSION=$7
USER_NAME=$8
USER_EMAIL=$9

DO_NOT_CREATE_PROJECT_DIR=${10}

PROJECT_ROOT=$(pwd)
APP_NAME=$(basename $PROJECT_DIR)
PARENT_NS=dev
Expand All @@ -50,11 +57,16 @@ then
CLUSTER_URL="http://127.0.0.1:8001"
fi

if [ "${DO_NOT_CREATE_PROJECT_DIR}" == "" ]; then DO_NOT_CREATE_PROJECT_DIR="false"; fi
if [ "${DO_NOT_CREATE_PROJECT_DIR}" == "true" ];
then
PROJECT_DIR="${PROJECT_DIR}/*"
fi

COMMIT_SHA=$(git rev-parse --short HEAD)
COMMIT_SHA="${COMMIT_SHA}${TEST_SESSION}"

echo "EXAMPLES_TEMP_DIR=${EXAMPLES_TEMP_DIR}"
echo "PROJECT_DIR=${PROJECT_DIR}"
echo "LOCK_MANAGER_MOCK=${LOCK_MANAGER_MOCK}"
echo "LOCK_MANAGER_API_RETRIES=$LOCK_MANAGER_API_RETRIES"
echo "CLUSTER_URL=${CLUSTER_URL}"
Expand All @@ -67,6 +79,8 @@ echo "Simulated CI commit \"$COMMIT_SHA\""
echo "Git username \"$USER_NAME\""
echo "Git user email \"$USER_EMAIL\""
echo "Timestamp for cleanup is \"$TIMESTAMP\""
echo "Relative path check ${DO_NOT_CREATE_PROJECT_DIR}"
echo "PROJECT_DIR=${PROJECT_DIR}"

if [ "${EXAMPLES_TEMP_DIR}" == "" ];
then
Expand Down
Loading