|
|
|
|
@ -90,7 +90,7 @@ jobs:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
container:
|
|
|
|
|
image: ubuntu:latest
|
|
|
|
|
options: --cap-add=NET_ADMIN --dns 127.0.0.1
|
|
|
|
|
options: --cap-add=NET_ADMIN
|
|
|
|
|
services:
|
|
|
|
|
squid-proxy:
|
|
|
|
|
image: ubuntu/squid:latest
|
|
|
|
|
@ -101,15 +101,18 @@ jobs:
|
|
|
|
|
https_proxy: http://squid-proxy:3128
|
|
|
|
|
steps:
|
|
|
|
|
- name: Wait for proxy to be ready
|
|
|
|
|
shell: bash
|
|
|
|
|
run: |
|
|
|
|
|
echo "Waiting for squid proxy to be ready..."
|
|
|
|
|
echo "Resolving squid-proxy hostname:"
|
|
|
|
|
getent hosts squid-proxy || echo "DNS resolution failed"
|
|
|
|
|
for i in $(seq 1 30); do
|
|
|
|
|
if nc -z squid-proxy 3128 2>/dev/null; then
|
|
|
|
|
if (echo > /dev/tcp/squid-proxy/3128) 2>/dev/null; then
|
|
|
|
|
echo "Proxy is ready!"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
echo "Attempt $i: Proxy not ready, waiting..."
|
|
|
|
|
sleep 1
|
|
|
|
|
sleep 2
|
|
|
|
|
done
|
|
|
|
|
echo "Proxy failed to become ready"
|
|
|
|
|
exit 1
|
|
|
|
|
@ -165,7 +168,7 @@ jobs:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
container:
|
|
|
|
|
image: ubuntu:latest
|
|
|
|
|
options: --cap-add=NET_ADMIN --dns 127.0.0.1
|
|
|
|
|
options: --cap-add=NET_ADMIN
|
|
|
|
|
services:
|
|
|
|
|
squid-proxy:
|
|
|
|
|
image: ubuntu/squid:latest
|
|
|
|
|
@ -176,15 +179,18 @@ jobs:
|
|
|
|
|
https_proxy: http://squid-proxy:3128
|
|
|
|
|
steps:
|
|
|
|
|
- name: Wait for proxy to be ready
|
|
|
|
|
shell: bash
|
|
|
|
|
run: |
|
|
|
|
|
echo "Waiting for squid proxy to be ready..."
|
|
|
|
|
echo "Resolving squid-proxy hostname:"
|
|
|
|
|
getent hosts squid-proxy || echo "DNS resolution failed"
|
|
|
|
|
for i in $(seq 1 30); do
|
|
|
|
|
if nc -z squid-proxy 3128 2>/dev/null; then
|
|
|
|
|
if (echo > /dev/tcp/squid-proxy/3128) 2>/dev/null; then
|
|
|
|
|
echo "Proxy is ready!"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
echo "Attempt $i: Proxy not ready, waiting..."
|
|
|
|
|
sleep 1
|
|
|
|
|
sleep 2
|
|
|
|
|
done
|
|
|
|
|
echo "Proxy failed to become ready"
|
|
|
|
|
exit 1
|
|
|
|
|
|