From 25263a97a6fb26b3e3a2de3b1d219bcc3bc19564 Mon Sep 17 00:00:00 2001 From: reddevilmidzy Date: Wed, 16 Oct 2024 15:29:16 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EB=A1=9C=EC=BB=AC=20IP=20=EC=A3=BC?= =?UTF-8?q?=EC=86=8C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/be_cd-test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/be_cd-test.yml b/.github/workflows/be_cd-test.yml index 80030354..d8294db1 100644 --- a/.github/workflows/be_cd-test.yml +++ b/.github/workflows/be_cd-test.yml @@ -110,9 +110,17 @@ jobs: - name: Determine Active and Inactive Ports (Blue/Green) id: determine-ports run: | + ip_blue="172.18.0.3" + ip_green="172.18.0.2" + ports=(8080 8081) ip="127.0.0.1" ports=(8080 8081) for port in "${ports[@]}"; do + if [ $port -eq 8080 ]; then + ip=$ip_blue + else + ip=$ip_green + fi RESPONSE=$(curl -s http://$ip:$port/api/actuator/health) IS_ACTIVE=$(echo ${RESPONSE} | grep 'UP' | wc -l) if [ $IS_ACTIVE -eq 1 -a $port -eq "8080" ]; then