Skip to content
Snippets Groups Projects
Commit b23aad7a authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

added conditions for prod volume and prod-queue-volume

parent 2873fccd
No related branches found
No related tags found
1 merge request!47Integration Testing: Sequential Merge and Validation of Four Feature Branches (PR #43,#44, #45,#46)
......@@ -44,9 +44,14 @@ prep-deploy:
elif [ "$TARGET_ENV" = "production" ]; then
export prod_instance_id=$(openstack floating ip show $prod_floating_ip -c port_details -f value | awk -F', ' '{print $2}' | awk -F"'" '{print $2}')
export volume_ids=$(openstack server show $prod_instance_id -c volumes_attached | grep -o "id='[a-zA-Z0-9\-]*'" | awk -F "'" '{print $2}')
export prod_volume=$(echo "$volume_ids" | awk 'NR==1')
export prod_queue_volume=$(echo "$volume_ids" | awk 'NR==2')
for volume_id in $volume_ids; do
volume_name=$(openstack volume show $volume_id -c name -f value)
if [[ $volume_name == xdmod-dev-volume* ]]; then
export prod_volume=$volume_id
elif [[ $volume_name == xdmod-dev-queue-volume* ]]; then
export prod_queue_volume=$volume_id
fi
done
echo "Detaching prod_volume=${prod_volume} from prod_instance_id=${prod_instance_id} and creating a snapshot"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment