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

[BE] feat: 백엔드 CD 작업 Github Actions로 위임 (#629) #630

Merged
merged 8 commits into from
Nov 27, 2023

Conversation

seokjin8678
Copy link
Collaborator

@seokjin8678 seokjin8678 added BE 백엔드에 관련된 작업 🏢 인프라 인프라에 관련된 작업 labels Nov 23, 2023
@seokjin8678 seokjin8678 self-assigned this Nov 23, 2023
@seokjin8678 seokjin8678 linked an issue Nov 23, 2023 that may be closed by this pull request
@seokjin8678 seokjin8678 changed the title [BE] feat: 백엔드 CD 작업 Github Actions로 위임 [BE] feat: 백엔드 CD 작업 Github Actions로 위임 (#629) Nov 23, 2023
@github-actions github-actions bot requested review from BGuga, carsago and xxeol2 November 23, 2023 07:22
Copy link

github-actions bot commented Nov 23, 2023

Unit Test Results

  89 files    89 suites   10s ⏱️
318 tests 318 ✔️ 0 💤 0
332 runs  332 ✔️ 0 💤 0

Results for commit a40b5a1.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@carsago carsago left a comment

Choose a reason for hiding this comment

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

제가 이해한 CD 플로우
github action에서 build -> jar 파일 scp로 ec2에 전송 -> 해당서버에 ssh로 접속 후 배포 스크립트 실행

맞나요?

@seokjin8678
Copy link
Collaborator Author

seokjin8678 commented Nov 26, 2023

제가 이해한 CD 플로우 github action에서 build -> jar 파일 scp로 ec2에 전송 -> 해당서버에 ssh로 접속 후 배포 스크립트 실행

맞나요?

정확합니다!
참고로 strip을 사용한 이유는 jar 파일이 바로 전송되는게 아닌, /build/libs/*.jar로 폴더가 생겨서 전송되어서 그렇습니다!

Copy link
Member

@xxeol2 xxeol2 left a comment

Choose a reason for hiding this comment

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

이사갑시다.. 2️⃣4️⃣

@@ -16,28 +16,40 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 리포지토리 체크아웃
- name: repository checkout
Copy link
Member

Choose a reason for hiding this comment

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

global 해졌네요

Comment on lines +37 to +55
# 2023-11-23 기준 EC2 프리티어 사용으로 인해 DEV 환경을 PROD 환경에서 실행함
- name: deploy use scp
uses: appleboy/scp-action@master
with:
url: ${{ secrets.JENKINS_URL }}
user: "festago"
token: ${{ secrets.JENKINS_API_TOKEN}}
job: "festago-dev-cd"
host: ${{secrets.FESTAGO_PROD_IP}}
username: ${{secrets.FESTAGO_PROD_USERNAME}}
key: ${{secrets.FESTAGO_SSH_KEY}}
source: "./backend/build/libs/*.jar"
target: ${{ vars.FESTAGO_PROD_JAR_DIR }}
strip_components: 3

- name: run application use ssh
uses: appleboy/ssh-action@master
with:
host: ${{secrets.FESTAGO_PROD_IP}}
username: ${{secrets.FESTAGO_PROD_USERNAME}}
key: ${{secrets.FESTAGO_SSH_KEY}}
script_stop: true
script: ${{ vars.FESTAGO_DEV_DEPLOY_COMMAND }}
Copy link
Member

Choose a reason for hiding this comment

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

하나의 프리티어 서버에서 port 다르게 dev / prod 띄우면 서버 죽어날까요 ..? 궁금하네요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

그때 젠킨스 동시에 띄웠을 때 열 받아서 뻗친거 생각하면... 아마 죽지 않을까요..? 메모리가 2기가라서..

@seokjin8678 seokjin8678 merged commit 79646a6 into dev Nov 27, 2023
4 checks passed
@seokjin8678 seokjin8678 deleted the feat/#629 branch November 27, 2023 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE 백엔드에 관련된 작업 🏢 인프라 인프라에 관련된 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] 백엔드 CD 작업을 Github Actions로 위임한다.
3 participants