-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Firebase App Distribution 세팅 및 구현 - CLI #425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @kangyuri1114, 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은 Firebase App Distribution을 프로젝트에 통합하여 애플리케이션의 릴리스 APK를 효율적으로 배포할 수 있도록 합니다. 특히 디버그 빌드에 대한 자동 배포 설정을 포함하며, 향후 GitHub Actions를 통한 자동화된 배포 워크플로우 구축의 기반을 마련합니다. Highlights
Using Gemini Code AssistThe 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 by creating a comment using either
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 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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
Firebase App Distribution 설정 추가를 확인했습니다. 이번 PR을 통해 디버그 빌드를 QA 그룹에 쉽게 배포할 수 있게 되었네요.
한 가지 중요한 보안 관련 피드백을 app/build.gradle.kts 파일에 남겼습니다. 서비스 계정 키와 같은 민감한 정보를 안전하게 관리하는 것은 매우 중요하므로, 제안드린 내용을 꼭 확인해주시기 바랍니다. 이 부분을 수정하면 더 안전하고 견고한 배포 프로세스를 구축할 수 있을 것입니다.
app/build.gradle.kts
Outdated
| firebaseAppDistribution { | ||
| serviceCredentialsFile = "$rootDir/serviceAccountKey.json" | ||
| artifactType = "APK" | ||
| groups = "eat-ssu-android-qa" | ||
| releaseNotes = """ | ||
| Debug 빌드 - 버전 ${defaultConfig.versionName} (${defaultConfig.versionCode}) | ||
| 내부 테스트용 빌드입니다. | ||
| """.trimIndent() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serviceAccountKey.json 파일의 경로를 하드코딩하는 것은 심각한 보안 위험을 초래할 수 있습니다. 이 파일이 실수로 Git 저장소에 커밋되면 Firebase 프로젝트에 대한 전체 액세스 권한이 노출될 수 있습니다.
CI/CD 환경과 로컬 개발 환경 모두에서 안전하게 인증 정보를 관리하는 것이 중요합니다.
개선 제안 (CI/CD 우선):
아래와 같이 serviceCredentials 프로퍼티를 사용하여 환경 변수로부터 직접 인증 정보를 읽어오도록 수정하는 것을 권장합니다. 이는 GitHub Actions과 같은 CI/CD 환경에서 GitHub Secrets를 활용하는 가장 안전한 방법입니다.
로컬에서 빌드할 경우, local.properties에 파일 경로를 지정하고 빌드 스크립트에서 해당 경로를 읽어 사용하도록 구성할 수 있습니다. 제안된 코드는 CI/CD 환경에 최적화되어 있으며, 로컬 빌드와의 호환성을 위해서는 추가적인 로직이 필요할 수 있습니다. 예를 들어, 환경 변수가 없을 때 local.properties에서 경로를 읽어오도록 분기 처리를 할 수 있습니다.
firebaseAppDistribution {
// GitHub Secrets 등 보안 저장소의 서비스 계정 정보를 환경 변수(예: FIREBASE_CREDENTIALS)로 받아 사용합니다.
// 이 방법은 민감한 정보를 소스 코드에서 분리하여 보안을 강화합니다.
serviceCredentials = System.getenv("FIREBASE_CREDENTIALS")
artifactType = "APK"
groups = "eat-ssu-android-qa"
releaseNotes = """
Debug 빌드 - 버전 ${defaultConfig.versionName} (${defaultConfig.versionCode})
내부 테스트용 빌드입니다.
""".trimIndent()
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 적용해볼게요
HI-JIN2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다~~ 🎉
근데 트리거가 되는게 안드로이드 ci가 돌때마다 테스트 버전 배포가 되는건가요???
릴리즈 브랜치의 ci가 돌았을때만 트리거 해도 되지 않을까요?
디벨롭 <- 피쳐/픽스 머지머지
디벨롭 기준으로 릴리즈 브랜치 생성
릴리즈 브랜치에서 일어난 일은 hotfix 브랜치에서 작업 후 릴리즈 브랜치로 머지
이렇게 되면 릴리즈 브랜치만 트리거해도 의도대로 다 동작할 수 있을 것 같아요!
9a523ed to
53364be
Compare
|
진님의 워크플로우 트리거 방식이 맞는 방향같아서 수정하다가요! 관련 커밋 : 33fdfb5 Android CI는 아래 둘 중 하나일 때만 실제 실행됩니다.
Firebase App Distribution 워크플로우가 “실행 후보”가 되는 조건
Firebase App Distribution이 실행되면 수행하는 작업 과정
|
Summary
Firebase App Distribution 세팅 및 구현
Describe your changes
Android CI는 아래 둘 중 하나일 때만 실제 실행됩니다.
Firebase App Distribution 워크플로우가 “실행 후보”가 되는 조건
Firebase App Distribution이 실행되면 수행하는 작업 과정
Issue
To reviewers
github workflow - android.yml 업데이트 됐습니다, qa_apk_firebase.yml 파일 추가와 동시에 관련 github secrets가 업데이트 됐습니다
그리고 CLI 방식으로 진행하기 위한 firebase token을 발급할 때는 제 개인 firebase계정의 잇슈 권한으로 발급 받은거라
아마 제가 나중에 잇슈 firebase에서 추방된다면 동작하지 않을 것 같아요
그래서 발급받는 법을 노션에 정리해두었습니다.
https://www.notion.so/eat-ssu/FIREBASE_CI_TOKEN-2d2eeef75a168024955dc5d4fc2cc576?source=copy_link