fix: 환경변수파일 수정 및 deploy.yml 파일 환경변수 파일 생성 로직 추가#7
Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @yangjunsik, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
이 PR은 CI/CD 파이프라인에서 Spring Boot 애플리케이션 실행 시 발생하던 PlaceholderResolutionException 오류를 해결하기 위해 작성되었습니다. GitHub Secrets에 저장된 OAuth 관련 환경 변수 파일을 빌드 단계에서 동적으로 생성함으로써, 필요한 설정 파일 누락 문제를 해결하고 애플리케이션이 정상적으로 빌드 및 실행될 수 있도록 합니다.
Highlights
- CI/CD 파이프라인 개선:
deploy.yml워크플로우에 GitHub Secrets(APPLICATION_DEV_OAUTH_YML)에 저장된 base64 인코딩된 OAuth 설정 값을 디코딩하여src/main/resources/application-prod-oauth.yml파일로 생성하는 단계를 추가했습니다. - 환경 변수 파일 관리: 생성될 수 있는 OAuth 설정 파일(
application-dev-oauth.yml,application-prod-oauth.yml)이 Git 저장소에 커밋되지 않도록.gitignore파일에 추가했습니다. - 빌드 오류 해결: Spring Boot 애플리케이션 빌드 시 OAuth 관련 설정 파일 누락으로 인해 발생하던
PlaceholderResolutionException을 방지합니다.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
안녕하세요. PR 잘 검토했습니다. .gitignore에 OAuth 설정 파일을 추가하여 민감 정보를 관리하는 방향은 올바릅니다.
다만, PR 설명에 공유해주신 deploy.yml 스크립트와 관련하여 몇 가지 중요한 점을 지적해 드리고자 합니다. 작성자께서도 질문 주신 부분인데, 현재 설정은 dev 환경의 시크릿으로 prod 환경의 설정 파일을 생성하고 있어 환경 간 설정이 뒤섞일 위험이 있습니다. 이는 심각한 장애로 이어질 수 있는 문제입니다.
문제점 및 해결 방안:
-
환경 불일치:
APPLICATION_DEV_OAUTH_YML시크릿은application-dev-oauth.yml파일을 생성하는 데 사용되어야 합니다. 만약prod환경 배포가 목적이라면,APPLICATION_PROD_OAUTH_YML시크릿을 별도로 생성하고 사용해야 합니다.dev환경용 수정안:- name: application-dev-oauth.yml 파일 생성 run: | echo "${{ secrets.APPLICATION_DEV_OAUTH_YML }}" | base64 --decode > ./src/main/resources/application-dev-oauth.yml
prod환경용 수정안:- name: application-prod-oauth.yml 파일 생성 run: | echo "${{ secrets.APPLICATION_PROD_OAUTH_YML }}" | base64 --decode > ./src/main/resources/application-prod-oauth.yml
-
prod프로필 설정 누락:prod환경에서 OAuth를 사용하려면,src/main/resources/application-prod.yml에application-prod-oauth.yml을 임포트하는 설정이 필요합니다. 이 부분이 누락되어 있습니다.
이 수정 사항들을 반영하여 각 환경에 맞는 설정이 명확하게 분리되도록 하는 것이 중요합니다. 이렇게 하면 더 안정적인 배포 파이프라인을 구축할 수 있습니다.
refactor: 로그인 리프레쉬 api 쿠키 안쓰게 변경
🔧 PR 내용
1. CI/CD 파이프라인 수정
deploy.yml에 application-dev-oauth.yml 생성 단계 추가GitHub Secrets(
APPLICATION_DEV_OAUTH_YML)을 base64 디코딩해src/main/resources에 파일로 저장✅ 변경 이유
application-*-oauth.yml설정 파일 누락으로 인해 테스트/빌드 단계에서PlaceholderResolutionException발생📌 참고
application-dev-oauth.yml,application-prod-oauth.yml등으로 확장 가능👉 리뷰 포인트:
application-prod-oauth.yml로 생성되도록 했는데, 의도대로prod가 맞는지 확인 필요합니다 (혹시dev로 써야 하는지 체크).##관련이슈
#1 #2