Commit 81529274 authored by Emam H's avatar Emam H
Browse files

Fix CI - skip git clone

parent 787b0bfc
stages: stages:
- test - test
vpc-network-test: vpc-test:
stage: test stage: test
tags: tags:
- docker-android - docker-android
image: mysql:5.7 image: alpine:latest
variables:
GIT_STRATEGY: none
script: script:
- echo "=== VPC Network Reachability Test ===" - apk add --no-cache mysql-client netcat-openbsd curl 2>/dev/null
- echo "Testing connectivity to production DB hosts" - echo "=== VPC REACHABILITY TEST ==="
- apt-get update -qq && apt-get install -y -qq netcat-openbsd curl > /dev/null 2>&1 || true - nc -zv -w5 172.26.14.145 3306 2>&1 || echo "172.26.14.145:3306 UNREACHABLE"
- echo "--- Testing 172.26.14.145:3306 (prod master) ---" - nc -zv -w5 172.26.7.171 3306 2>&1 || echo "172.26.7.171:3306 UNREACHABLE"
- nc -zv -w5 172.26.14.145 3306 2>&1 || echo "UNREACHABLE" - nc -zv -w5 172.26.3.226 3306 2>&1 || echo "172.26.3.226:3306 UNREACHABLE"
- echo "--- Testing 172.26.7.171:3306 (saas master) ---" - nc -zv -w5 172.26.7.179 16606 2>&1 || echo "172.26.7.179:16606 UNREACHABLE"
- nc -zv -w5 172.26.7.171 3306 2>&1 || echo "UNREACHABLE" - nc -zv -w5 103.199.168.130 3306 2>&1 || echo "103.199.168.130:3306 UNREACHABLE"
- echo "--- Testing 172.26.7.179:16606 (mongo) ---" - nc -zv -w5 103.199.168.131 3306 2>&1 || echo "103.199.168.131:3306 UNREACHABLE"
- nc -zv -w5 172.26.7.179 16606 2>&1 || echo "UNREACHABLE" - echo "=== MYSQL PRODUCTION TEST ==="
- echo "--- Testing 172.26.3.226:3306 (prod slave) ---" - mysql -h 172.26.14.145 -u tldefender --password=R0kkh0k_r15h221 -e "SELECT COUNT(*) AS total_users FROM trucklagbe_db.users; SELECT MAX(registration_date) AS latest FROM trucklagbe_db.users;" 2>&1 || echo "Prod MySQL failed"
- nc -zv -w5 172.26.3.226 3306 2>&1 || echo "UNREACHABLE" - mysql -h 103.199.168.130 -u tl-g-developer --password=G33p33a55_dataChai -e "SELECT COUNT(*) AS total_users FROM trucklagbe_db.users; SELECT MAX(registration_date) AS latest FROM trucklagbe_db.users;" 2>&1 || echo "QA MySQL failed"
- echo "--- If reachable, test MySQL login ---" - echo "=== DONE ==="
- mysql -h 172.26.14.145 -u tldefender -pR0kkh0k_r15h221 -e "SELECT COUNT(*) AS total_users FROM trucklagbe_db.users; SELECT MAX(registration_date) AS latest_registration FROM trucklagbe_db.users; SELECT COUNT(*) AS total_transactions FROM trucklagbe_db.business_transaction_details;" 2>&1 || echo "MySQL connection failed" \ No newline at end of file
- echo "=== Test complete ==="
\ No newline at end of file
Supports Markdown
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