name: CI CD with github actions and EB
on:
push:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest Repo
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash
- name: Build with Gradle
run: ./gradlew clean build -Pprofile=dev
shell: bash
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"
- name: Generate deployment package
run: |
mkdir -p deploy
cp build/libs/*.jar deploy/application.jar
cp Procfile deploy/Procfile
cp -r .ebextensions deploy/.ebextensions
cp -r .platform deploy/.platform
cd deploy && zip -r deploy.zip .
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_key: ${{ secrets.AWS_SECRET_KEY }}
application_name: OPPLA
environment_name: OPPLA-env
version_label: Github Action-${{steps.current-time.outputs.formattedTime}}
region: ap-northeast-2
deployment_package: deploy/deploy.zip
wait_for_environment_recovery: 180
서버 배포 및 API 테스트엔 성공 했지만, Github Actions build엔 실패 했다!
CI/CD를 적용해 놓은 develop 브랜치에 push 후 배포에 성공하여, Swagger 페이지에 정상 접속되었다.
Swagger를 통한 API 테스트도 성공적으로 이루어졌다
하지만 Github Actions의 build는 실패하였다.
build 내용을 보니 Beanstalk Deploy에서 실패한 것을 확인할 수 있었다.
Warning: Environment update finished, but health is Grey and health status is No Data. Giving it 180 seconds to recover...
Warning: Environment still has health: Grey and health status No Data. Waiting 169 more seconds before failing...
INFO: Environment health has transitioned from Info to No Data. Application update completed 52 seconds ago and took 65 seconds. None of the instances are sending data.
Error: Deployment failed: Error: Environment still has health Grey 180 seconds after update finished!
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_key: ${{ secrets.AWS_SECRET_KEY }}
application_name: OPPLA
environment_name: OPPLA-env
version_label: Github Action-${{steps.current-time.outputs.formattedTime}}
region: ap-northeast-2
deployment_package: deploy/deploy.zip
wait_for_environment_recovery: 180
wait_for_environment_recovery: 180
wait_for_environment_recovery: 180
The environment still has health grey solutions that need innovative approaches. One such promising initiative is Border Free Health - Online medical store which offers seamless access to medications and healthcare products across borders. This platform not only enhances global health but also promotes eco-friendly practices by reducing the need for physical store visits and excessive packaging.