Skip to content

Commit

Permalink
싹다소문자로
Browse files Browse the repository at this point in the history
  • Loading branch information
eumppe committed Jan 10, 2024
1 parent c2fcb2f commit 2d22810
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:

- name: stop and remove the previous container
run: |
if docker ps -a | grep -q 'HeXA_Homepage_Backend'; then
if docker ps | grep -q 'HeXA_Homepage_Backend'; then
docker stop HeXA_Homepage_Backend
if docker ps -a | grep -q 'hexa_homepage_backend'; then
if docker ps | grep -q 'hexa_homepage_backend'; then
docker stop hexa_homepage_backend
fi
docker container rm HeXA_Homepage_Backend
docker container rm hexa_homepage_backend
fi
Expand All @@ -35,16 +35,16 @@ jobs:

- name: run and test
run: |
docker run -d -p 8282:8080 --name HeXA_Homepage_Backend HeXA_Homepage_Backend
test_result="$(docker exec HeXA_Homepage_Backend ./gradlew test)"
docker run -d -p 8282:8080 --name hexa_homepage_backend hexa_homepage_backend
test_result="$(docker exec hexa_homepage_backend ./gradlew test)"
second_last_line="$(echo "$test_result" | tail -n 2 | head -n 1)"
if [[ "$second_last_line" =~ ^BUILD\ SUCCESSFUL ]]; then
echo "TEST SUCCESSFUL"
else
docker stop HeXA_Homepage_Backend
docker container rm HeXA_Homepage_Backend
last_version=$(docker images | grep 'HeXA_Homepage_Backend' | awk '{print $2}' | tail -n 2 | head -n 1)
docker run -d -p 8282:8080 --name HeXA_Homepage_Backend HeXA_Homepage_Backend:$last_version
docker stop hexa_homepage_backend
docker container rm hexa_homepage_backend
last_version=$(docker images | grep 'hexa_homepage_backend' | awk '{print $2}' | tail -n 2 | head -n 1)
docker run -d -p 8282:8080 --name hexa_homepage_backend hexa_homepage_backend:$last_version
echo "TEST FAILED"
fi

0 comments on commit 2d22810

Please sign in to comment.