Skip to content

Commit

Permalink
fix: 무중단 배포 github action v1.13 #327
Browse files Browse the repository at this point in the history
  • Loading branch information
GIVEN53 committed Oct 23, 2024
1 parent 033140a commit f3717be
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/self-hosted-runner-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,14 @@ jobs:
- name: Start Java Application
run: sudo nohup java -Dspring.profiles.active=${{ inputs.profile }} -Dserver.port=${{ steps.blue_green_port.outputs.green_port }} -Duser.timezone=Asia/Seoul -jar ${{ env.default_path }}/${{ inputs.jar_name }} &

health-check:
needs: deploy
runs-on: ${{ inputs.self_hosted_runner }}
steps:

- name: Health Check
run: |
${{ env.default_path }}/green_health_check.sh $GREEN_PORT
${{ env.default_path }}/green_health_check.sh ${{ steps.blue_green_port.outputs.green_port }}
debug:
needs: health-check
runs-on: ubuntu-latest
if: ${{ needs.health-check.result == 'failure' }}
steps:
- name: Debug
run: echo "Deploy failed" # 추후 수정
- name: fail
if: ${{ failure() }} # 추후 수정
run: |
echo "Deploy failed"
sudo lsof -i :${{ steps.blue_green_port.outputs.green_port }} | awk 'NR!=1 {print $2}' | xargs kill -9
exit 1

0 comments on commit f3717be

Please sign in to comment.