Skip to content

fix: 환경변수파일 수정 및 deploy.yml 파일 환경변수 파일 생성 로직 추가#7

Merged
yangjunsik merged 1 commit intomainfrom
feature/#2-login
Aug 19, 2025
Merged

fix: 환경변수파일 수정 및 deploy.yml 파일 환경변수 파일 생성 로직 추가#7
yangjunsik merged 1 commit intomainfrom
feature/#2-login

Conversation

@yangjunsik
Copy link
Copy Markdown
Contributor

🔧 PR 내용

1. CI/CD 파이프라인 수정

  • deploy.ymlapplication-dev-oauth.yml 생성 단계 추가

    - name: application-dev-oauth.yml 파일 생성하기
      run: |
        echo "${{ secrets.APPLICATION_DEV_OAUTH_YML }}" | base64 --decode > ./src/main/resources/application-prod-oauth.yml
  • GitHub Secrets(APPLICATION_DEV_OAUTH_YML)을 base64 디코딩해 src/main/resources에 파일로 저장


✅ 변경 이유

  • Spring Boot 실행 시 application-*-oauth.yml 설정 파일 누락으로 인해 테스트/빌드 단계에서 PlaceholderResolutionException 발생
  • 해당 설정 파일을 CI 단계에서 생성해 소셜 로그인/토큰 관련 프로퍼티 누락 문제 해결

📌 참고

  • Secrets 값은 base64 인코딩된 yml을 그대로 넣으면 됨
  • 로컬/배포 환경 분기 시 application-dev-oauth.yml, application-prod-oauth.yml 등으로 확장 가능

👉 리뷰 포인트:

  • 파일명 application-prod-oauth.yml로 생성되도록 했는데, 의도대로 prod가 맞는지 확인 필요합니다 (혹시 dev로 써야 하는지 체크).

##관련이슈
#1 #2

@yangjunsik yangjunsik self-assigned this Aug 19, 2025
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. 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.

@yangjunsik yangjunsik merged commit ecc7a73 into main Aug 19, 2025
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

안녕하세요. PR 잘 검토했습니다. .gitignore에 OAuth 설정 파일을 추가하여 민감 정보를 관리하는 방향은 올바릅니다.

다만, PR 설명에 공유해주신 deploy.yml 스크립트와 관련하여 몇 가지 중요한 점을 지적해 드리고자 합니다. 작성자께서도 질문 주신 부분인데, 현재 설정은 dev 환경의 시크릿으로 prod 환경의 설정 파일을 생성하고 있어 환경 간 설정이 뒤섞일 위험이 있습니다. 이는 심각한 장애로 이어질 수 있는 문제입니다.

문제점 및 해결 방안:

  1. 환경 불일치: 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
  2. prod 프로필 설정 누락: prod 환경에서 OAuth를 사용하려면, src/main/resources/application-prod.ymlapplication-prod-oauth.yml을 임포트하는 설정이 필요합니다. 이 부분이 누락되어 있습니다.

이 수정 사항들을 반영하여 각 환경에 맞는 설정이 명확하게 분리되도록 하는 것이 중요합니다. 이렇게 하면 더 안정적인 배포 파이프라인을 구축할 수 있습니다.

yangjunsik added a commit that referenced this pull request Aug 21, 2025
refactor: 로그인 티켓 방식으로 변경
yangjunsik added a commit that referenced this pull request Aug 21, 2025
refactor: 로그인 티켓 방식으로 변경
yangjunsik added a commit that referenced this pull request Aug 21, 2025
refactor: 로그인 리프레쉬 api 쿠키 안쓰게 변경
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant