Conversation
mooninbeom
commented
Feb 28, 2025
Comment on lines
+32
to
+33
| - name: Test 🧪 | ||
| run: TEST_URL=${{secrets.TEST_URL}} PRODUCTION_URL=${{secrets.PRODUCTION_URL}} PORT_NUM=${{secrets.PORT_NUM}} swift test -v |
Contributor
Author
There was a problem hiding this comment.
Github Secrets에 담아놓은 정보들을 넣어 테스트를 돌리게 됩니다!
mooninbeom
commented
Feb 28, 2025
| uses: actions/checkout@v4 | ||
|
|
||
| - name: 버전 정보 추출 | ||
| run: echo "##[set-output name=version;]$(echo '${{ github.event.head_commit.message }}' | egrap -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')" |
Contributor
Author
There was a problem hiding this comment.
PR이 머지될 때 만들어지는 커밋의 메세지에서 버전 정보를 정규표현식을 사용해 빼옵니다!
이 때 자동생성되는 커밋 메시지는 브랜치 명이 들어가 있기 때문에 브랜치명에 버전이 꼭 기입되어 있어야 합니다!
Contributor
There was a problem hiding this comment.
말씀주신 것처럼 Merge 하는 커밋 메시지는 건드리지 않는게 좋겠네요!
mooninbeom
commented
Feb 28, 2025
| with: | ||
| tag_name: ${{steps.extract_version_name.outputs.version}} | ||
| release_name: ${{steps.extract_version_name.outputs.version}} | ||
| body: ${{github.event.pull_request.body}} |
Contributor
Author
There was a problem hiding this comment.
내용에는 PR의 컨텐츠가 들어가게 됩니다.
release에 들어갈 내용을 PR에 작성하면 됩니다!
thinkySide
approved these changes
Feb 28, 2025
Contributor
thinkySide
left a comment
There was a problem hiding this comment.
CI 적용을 이렇게 맛볼 수 있다니 너무 좋네요 ㅎㅎ 감사합니다!
OhMyungJin
approved these changes
Mar 1, 2025
Contributor
OhMyungJin
left a comment
There was a problem hiding this comment.
버전 기입, 커밋메시지 수정x
인지했습니다!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #19
상세 설명
저희 네트워크 모듈 CI/CD를 구현했습니다.
파이프라인
모듈 Build -> 모듈 Test -> 테스트 통과 후 머지 -> main에 머지 될 시 release, tag 자동 생성
workflow 파일은 코드 유효성을 체크하는
qappleRepoCI.yml과 CD를 담당하는release.yml으로 나뉘어져 있습니다.qappleRepoCI
트리거: pull request [develop, main] / push [develop, main]
release
트리거 push [main]
자동 release 사용시 주의 사항
태그를 추출하기 위해 PR의 head commit message에서 정규 표현식을 통해 버전 정보를 가져 옵니다.
그래서 PR을 위한 브랜치를 생성할 때에 브랜치명에 버전을 기입해야 합니다.
ex)
release/1.0.3-> ✅release/nextVersion-> ❌그리고 pr을 머지할 때에 커밋 메시지를 왠만하면 수정하지 않고 바로 머지하는 것이 좋습니다.
자동 생성되는 커밋 메시지에 브랜치명이 기입되어 있어 해당 메시지에서 버전 정보를 추출하기 때문입니다!
그리고 release의 컨텐츠는 PR의 body, 즉 PR에 작성한 내용이 들어가게 됩니다.
그러므로 release에 들어갈 내용을 PR 작성할 때 같이 기입하시면 됩니다!
마지막으로
저희 모듈의 테스트 코드 중 반드시 실패하는 테스트들이 있어 CI를 통과하기 위해서는 정리가 필요해 보입니다!!