Skip to content
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

Revert "fix/#111 CD 워크플로 실행 버그 픽스" #113

Closed

Conversation

LeeHanEum
Copy link
Member

Reverts #112

@LeeHanEum LeeHanEum added the 🐞bug Something isn't working label Nov 27, 2024
@LeeHanEum LeeHanEum self-assigned this Nov 27, 2024
@LeeHanEum LeeHanEum requested a review from Copilot November 27, 2024 00:53
Copy link
Contributor

coderabbitai bot commented Nov 27, 2024

Walkthrough

이 PR에서는 개발 서버에 대한 빌드 및 배포 워크플로우 구성이 변경되었습니다. develop 브랜치에 대한 push 이벤트가 제거되고 workflow_dispatch 이벤트만 남았습니다. Docker 이미지 빌드 단계에서 IMAGE_TAG 환경 변수가 추가되었고, 이미지 이름이 aics-server에서 aics-api로 변경되었습니다. 배포 단계의 이름이 "SSH to server and deploy"에서 "Deploy to dev"로 변경되었으며, Docker Compose YAML 경로 지정이 제거되었습니다.

Changes

파일 경로 변경 요약
.github/workflows/dev-build-deploy.yml - push 이벤트 제거, workflow_dispatch만 남김
- build-docker-imagedeploy-to-dev 작업 이름 변경
- Docker 이미지 이름을 aics-server에서 aics-api로 변경
- 배포 스크립트에서 Docker Compose YAML 경로 지정 제거
aics-api/src/main/resources/application.yml - spring.application.name 속성을 aics-server에서 aics-api로 변경

Possibly related PRs

Suggested labels

✨feature

Suggested reviewers

  • LeeShinHaeng

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

.github/workflows/dev-build-deploy.yml:43

  • The name 'docker Hub push' should be 'Docker Hub push' for consistency and correct capitalization.
- name: docker Hub push
@LeeHanEum LeeHanEum closed this Nov 27, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (1)
.github/workflows/dev-build-deploy.yml (1)

Line range hint 1-61: 워크플로우 트리거 전략 검토 필요

현재 워크플로우가 수동 트리거(workflow_dispatch)로만 설정되어 있습니다. 이는 지속적 배포(CD) 관점에서 자동화의 이점을 충분히 활용하지 못할 수 있습니다. develop 브랜치에 대한 자동 배포가 필요한지 검토해 주시기 바랍니다.

🧰 Tools
🪛 actionlint (1.7.4)

38-38: shellcheck reported issue in this script: SC2086:info:1:60: Double quote to prevent globbing and word splitting

(shellcheck)


38-38: shellcheck reported issue in this script: SC2086:info:2:55: Double quote to prevent globbing and word splitting

(shellcheck)


44-44: shellcheck reported issue in this script: SC2086:info:1:56: Double quote to prevent globbing and word splitting

(shellcheck)

🪛 yamllint (1.35.1)

[error] 61-61: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 186f82c and 6a3fbf1.

📒 Files selected for processing (2)
  • .github/workflows/dev-build-deploy.yml (1 hunks)
  • aics-api/src/main/resources/application.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • aics-api/src/main/resources/application.yml
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/dev-build-deploy.yml

38-38: shellcheck reported issue in this script: SC2086:info:1:60: Double quote to prevent globbing and word splitting

(shellcheck)


38-38: shellcheck reported issue in this script: SC2086:info:2:55: Double quote to prevent globbing and word splitting

(shellcheck)


44-44: shellcheck reported issue in this script: SC2086:info:1:56: Double quote to prevent globbing and word splitting

(shellcheck)

🪛 yamllint (1.35.1)
.github/workflows/dev-build-deploy.yml

[error] 61-61: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (1)
.github/workflows/dev-build-deploy.yml (1)

52-61: 배포 구성 검증 및 파일 형식 수정 필요

  1. docker-compose 명령어가 단순화되었는데, 작업 디렉토리에 docker-compose.yml 파일이 있는지 확인이 필요합니다.
  2. 파일 끝에 개행 문자가 누락되었습니다.

다음과 같이 수정을 제안드립니다:

   script: |
     sudo docker-compose pull ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest
-    sudo docker-compose up -d
+    sudo docker-compose up -d
+
🧰 Tools
🪛 yamllint (1.35.1)

[error] 61-61: no new line character at the end of file

(new-line-at-end-of-file)

Comment on lines +45 to +46
docker push ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG
docker push ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Docker 푸시 명령어 안전성 개선 필요

변수를 포함한 Docker 푸시 명령어에도 따옴표 처리가 필요합니다.

다음과 같이 수정을 제안드립니다:

- docker push ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG
- docker push ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest
+ docker push "${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG"
+ docker push "${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
docker push ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG
docker push ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest
docker push "${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG"
docker push "${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest"

Comment on lines +36 to +40
env:
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/aics-server:${{ github.sha }} .
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/aics-server:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/aics-server:latest
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG .
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

쉘 스크립트 안전성 개선 및 이미지 이름 변경 확인 필요

Docker 빌드 명령어에서 변수 사용 시 따옴표 처리가 필요하며, 이미지 이름 변경이 전체 애플리케이션에서 일관되게 적용되었는지 확인이 필요합니다.

다음과 같이 수정을 제안드립니다:

- docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG .
- docker tag ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest
+ docker build -t "${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG" .
+ docker tag "${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG" "${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
env:
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/aics-server:${{ github.sha }} .
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/aics-server:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/aics-server:latest
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG .
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG ${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest
env:
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t "${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG" .
docker tag "${{ secrets.DOCKERHUB_USERNAME }}/aics-api:$IMAGE_TAG" "${{ secrets.DOCKERHUB_USERNAME }}/aics-api:latest"
🧰 Tools
🪛 actionlint (1.7.4)

38-38: shellcheck reported issue in this script: SC2086:info:1:60: Double quote to prevent globbing and word splitting

(shellcheck)


38-38: shellcheck reported issue in this script: SC2086:info:2:55: Double quote to prevent globbing and word splitting

(shellcheck)

@LeeShinHaeng LeeShinHaeng deleted the revert-112-fix/#111-docker-compose-not-found branch December 4, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant