Commit 32ff7e10 by yiling.shen

add data import execution and results verification to CI/CD pipeline

parent 8e52e09c
Pipeline #3211 passed with stages
in 1 minute 50 seconds
......@@ -65,6 +65,13 @@ deploy_to_production:
- echo "Try to run safe_import_patients.py manually"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && docker compose exec -T patient_callback_app python safe_import_patients.py 2>&1 || echo 'safe_import_patients.py execution failed'"
- echo "Data import check end"
- echo "Data import execution start"
- echo "Execute data import script"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && docker compose exec -T patient_callback_app python safe_import_patients.py"
- echo "Check import results"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && docker compose exec -T mysql mysql -u root -pdev_password_123 -e 'USE callback_system; SELECT COUNT(*) as total_patients FROM patients;'"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && docker compose exec -T mysql mysql -u root -pdev_password_123 -e 'USE callback_system; SELECT clinic_name, COUNT(*) as count FROM patients GROUP BY clinic_name ORDER BY count DESC;'"
- echo "Data import execution end"
- echo "Deployment completed successfully"
only:
- master
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment