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

BITO-5464 bug-fixes in bito action script #32

Merged
merged 2 commits into from
Aug 8, 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
8 changes: 5 additions & 3 deletions bito-action-script/bito-actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
read_property() {
local property_key=$1
local property_file=$2
local property_value=$(grep -w "${property_key}" "${property_file}" | cut -d'=' -f2)
echo "${property_value}"
local property_value=$(grep -w "${property_key}" "${property_file}" | cut -d'=' -f2-)
echo "${property_value//\"}"
}

# Initialize variables with default empty values
Expand All @@ -30,20 +30,22 @@ do
case $arg in
agent_instance_url=*)
agent_instance_url="${arg#*=}"
agent_instance_url="${agent_instance_url//\"}"
;;
agent_instance_secret=*)
agent_instance_secret="${arg#*=}"
agent_instance_secret="${agent_instance_secret//\"}"
;;
git_url=*)
git_url="${arg#*=}"
git_url="${git_url//\"}"
;;
*)
echo "Unknown argument: $arg"
;;
esac
done


# Check if any of the required properties are empty
if [ -z "$agent_instance_url" ]; then
echo "Error: agent_instance_url is empty"
Expand Down