Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,46 @@ jobs:
deploy:
runs-on: ubuntu-latest
environment: backend_env
services:
mysql:
image: mysql:8.4
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: amumal_test
MYSQL_USER: testuser
MYSQL_PASSWORD: testpass
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot"
--health-interval=10s
--health-timeout=5s
--health-retries=10
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd="redis-cli ping"
--health-interval=10s
--health-timeout=5s
--health-retries=10
env:
DB_HOST: 127.0.0.1
DB_NAME: amumal_test
DB_USERNAME: testuser
DB_PASSWORD: testpass
DDL_AUTO_SET: create-drop
MAX_FILE_SIZE: 10MB
MAX_REQUEST_SIZE: 10MB
AWS_ACCESS_KEY: test-access-key
AWS_SECRET_KEY: test-secret-key
AWS_REGION: ap-northeast-2
AWS_S3_BUCKET: test-bucket
JWT_SECRET: c2VjcmV0a2V5c2VjcmV0a2V5c2VjcmV0a2V5c2VjcmV0a2V5
SERVER_URL: http://localhost
REDIS_HOST: 127.0.0.1
REDIS_PORT: 6379
steps:
- uses: actions/checkout@v4

Expand All @@ -34,6 +74,15 @@ jobs:
distribution: 'temurin'
java-version: '26'
cache: 'gradle'

- name: 외부 서비스 연결 확인 (MySQL, Redis)
shell: bash
run: |
echo > /dev/tcp/127.0.0.1/3306
echo "MySQL 연결 확인 완료"
echo > /dev/tcp/127.0.0.1/6379
echo "Redis 연결 확인 완료"

- name: 테스트
run: ./gradlew integrationTest --no-daemon

Expand Down
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ echo "$NEW_ENV_PATH" > "$(color_env_file "$TARGET_COLOR")"
echo "$NEW_TAG" > "$CURRENT_TAG_FILE"
echo "$NEW_ENV_PATH" > "$CURRENT_ENV_FILE"

echo "블루-그린 배포 성공: $TARGET_COLOR -> $NEW_TAG"
echo "블루-그린 배포 성공: $TARGET_COLOR -> $NEW_TAG"