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

deploy v1.1 #88

Merged
merged 46 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e68d923
chore: Issue closed 기능 assignee payload 수정
Dobby-Kim Jul 15, 2024
cbc8ede
feat: PR Open시 제목 prefix 설정
Dobby-Kim Jul 16, 2024
1122284
feat: AWS self-hosted runner 환경 이용 CD pipeline 구축
Dobby-Kim Jul 16, 2024
940a375
refactor: branch 자동 생성 대상 label 추가
Dobby-Kim Jul 16, 2024
848bbb3
chore: 수동 트리거 추가
Dobby-Kim Jul 16, 2024
bdf469f
fea(slack-alert): PR 리뷰 완료, Approve 슬랙 알림 기능 구현
Dobby-Kim Jul 17, 2024
3c05b4d
chore(issue-automation): issue assignee payload 수정
Dobby-Kim Jul 17, 2024
443600c
chore(actions-test): Jacoco 테스트 커버리지 검증 PR 메세지 생성 기능 추가
Dobby-Kim Jul 17, 2024
afec479
chore(actions-test): Jacoco 테스트 커버리지 검증 PR 메세지 생성 기능 추가
Dobby-Kim Jul 17, 2024
90b47a9
docs: 서비스 및 팀원 소개
Chocochip101 Jul 19, 2024
c973228
chore(CI): CI 과정 name 및 파일명 변경
Dobby-Kim Jul 19, 2024
a9cc69f
feat: 초기 프로젝트 설정
xogns1514 Jul 15, 2024
7f17a9a
Create draft PR for #21
github-actions[bot] Jul 15, 2024
0f50d16
feat: 특정 대시보드 프로세스 조회
cutehumanS2 Jul 15, 2024
2b2e035
feat: 존재하지 않는 대시보드 검증
cutehumanS2 Jul 15, 2024
8ae6b6e
test: 클래스 displayName 추가
cutehumanS2 Jul 15, 2024
c3acab0
프로세스 생성 (#35)
github-actions[bot] Jul 15, 2024
9f14ea8
feat: [be] 특정 지원자 카드를 대시보드의 다른 프로세스로 이동 (#30)
github-actions[bot] Jul 15, 2024
9459c3f
feat-be: 프로세스 삭제 (#38)
github-actions[bot] Jul 16, 2024
20ffb88
fix: updateApplicantProcess 오류 수정 (#45)
HyungHoKim00 Jul 16, 2024
0a6ecf0
refactor: 코드 포맷팅 (#48)
HyungHoKim00 Jul 16, 2024
581b116
feat-be: 더미 데이터 생성 (#50)
github-actions[bot] Jul 16, 2024
8228461
chore-be: Jacoco 연동 (#59)
github-actions[bot] Jul 17, 2024
96a256f
chore(slack-alert): PR review 완료, approve Slack 알림 기능 적용
Dobby-Kim Jul 17, 2024
8fdab0f
chore(slack-alert): PR review 완료, approve Slack 알림 기능 적용
Dobby-Kim Jul 17, 2024
466ddda
chore(slack-alert): PR approve payload 변경
Dobby-Kim Jul 17, 2024
4582f6e
feat-be: 프로세스 생성 및 삭제 시 검증 로직 추가 (#52)
github-actions[bot] Jul 17, 2024
71741e8
chore(actions-test): Jacoco 테스트 커버리지 검증 PR 메세지 생성 기능 추가
Dobby-Kim Jul 17, 2024
9ccfec3
chore(actions-test): Jacoco 테스트 커버리지 검증 PR 메세지 생성 기능 추가
Dobby-Kim Jul 17, 2024
fa1dcf6
chore(actions-test): JDK 버전 정보 명시
Dobby-Kim Jul 17, 2024
406ac68
chore(actions-test): JDK 버전 정보 명시 및 Jacoco profile 분할
Dobby-Kim Jul 17, 2024
41dedf8
chore(actions-test): jobs 분할 및 test fail 결과 관리 방법 변경
Dobby-Kim Jul 17, 2024
49ced93
chore(actions-test): JDK 환경 버전 설정 수정
Dobby-Kim Jul 17, 2024
238ea0d
fix(actions-test): Java 실행환경 통일을 위한 jobs 병합
Dobby-Kim Jul 17, 2024
fd6fc45
feat-be: 지원자 기본 정보 조회 (#63)
github-actions[bot] Jul 18, 2024
689c736
feat-be: 대시보드 생성 (#65)
github-actions[bot] Jul 18, 2024
5923409
feat-be: 평가항목 등록 (#67)
github-actions[bot] Jul 18, 2024
99727b0
feat-be: 프로세스 목록 조회 (#69)
github-actions[bot] Jul 18, 2024
c2f1e87
feat-be: 평가 조회 (#78)
github-actions[bot] Jul 19, 2024
befd750
chore(slack-alert): Slack 발송 메세지 수정
Dobby-Kim Jul 19, 2024
bb3e904
chore(slack-alert): Slack 발신 메세지 변경
Dobby-Kim Jul 19, 2024
8966e59
feat-be: 지원자 상세 정보 조회 (#72)
github-actions[bot] Jul 19, 2024
711d307
feat-be: 동아리 생성 (#82)
github-actions[bot] Jul 19, 2024
dd438ba
feat-be: 프로세스 목록 조회 응답에 평가자 수 추가 (#80)
github-actions[bot] Jul 19, 2024
d72c027
fix-be: CORS 허용 (#85)
github-actions[bot] Jul 19, 2024
4de2887
Merge branch 'be/main' into be/develop
Chocochip101 Jul 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 52 additions & 15 deletions .github/issue-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,60 @@ branches:
- frontend
prefix: fe-
name: fe/develop
- label:
- refactor
- backend
prefix: be-
name: be/develop
- label:
- refactor
- frontend
prefix: fe-
name: fe/develop
- label:
- chore
- backend
prefix: be-
name: be/develop
- label:
- chore
- frontend
prefix: fe-
name: fe/develop
- label:
- test
- backend
prefix: be-
name: be/develop
- label:
- test
- frontend
prefix: fe-
name: fe/develop
- label:
- fix
- backend
prefix: be-
name: be/develop
- label:
- fix
- frontend
prefix: fe-
name: fe/develop
- label:
- hotfix
- backend
prefix: be-hotfix-
name: be/release
- label:
- hotfix
- frontend
prefix: fe-hotfix-
name: fe/release
- label: docs
skip: true
- label: '*'
skip: true
# - label: docs
# prefix: docs/
# - label: hotfix
# prefix: hotfix/
# - label: refactor
# prefix: refactor/
# - label: chore
# prefix: chore/
# - label: release
# prefix: release/
# - label: test
# prefix: test/
# - label: fix
# prefix: fix/

commentMessage: |
🚀 안녕하세요 @${assignee.login}님! 작업을 시작하셨군요?
Expand All @@ -48,4 +86,3 @@ copyIssueLabelsToPR: true
copyIssueAssigneeToPR: true
copyIssueProjectsToPR: true
copyIssueMilestoneToPR: true

56 changes: 56 additions & 0 deletions .github/workflows/be-ci-pr-code-coverage-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: BE CI - Test Coverage 검증

on:
pull_request:
types: [opened, ready_for_review]
branches:
- be/develop

jobs:
test-coverage-pr-opened:
if: startsWith(github.head_ref, 'be-')
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17

- name: Cache Gradle wrapper
uses: actions/cache@v3
with:
path: |
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-

- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle.properties', '**/gradle-wrapper.properties', '**/settings.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: gradlew 권한 할당
run: chmod +x gradlew

- name: Run tests and generate coverage report
run: ./gradlew test

- name: 테스트 커버리지를 PR에 코멘트로 등록
uses: madrapps/jacoco-report@v1.6.1
with:
title: 📌 Test Coverage Report
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
67 changes: 67 additions & 0 deletions .github/workflows/be-pr-code-coverage-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: PR open시 테스트 커버리지 검증

on:
pull_request:
types: [opened, ready_for_review]
branches:
- be/develop

jobs:
test-coverage-pr-opened:
if: startsWith(github.head_ref, 'be-')
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
java-package: 'jdk'

- name: Cache Gradle wrapper
uses: actions/cache@v3
with:
path: |
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-

- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle.properties', '**/gradle-wrapper.properties', '**/settings.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run tests and generate coverage report
env:
JAVA_HOME: ${{ steps.setup-java.outputs.java-home }}
run: ./gradlew test jacocoTestReport
continue-on-error: true

- name: Verify test coverage
env:
JAVA_HOME: ${{ steps.setup-java.outputs.java-home }}
run: ./gradlew jacocoTestCoverageVerification
continue-on-error: true

- name: 테스트 커버리지를 PR에 코멘트로 등록
uses: madrapps/jacoco-report@v1.6.1
with:
title: 📌 Test Coverage Report
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
117 changes: 117 additions & 0 deletions .github/workflows/be-pr-event-alert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: BE PR Review 슬랙 알림

on:
pull_request:
types: [review_requested]
branches:
- main
- 'be/**'

pull_request_review:
types: [submitted]
branches:
- main
- 'be/**'

env:
Dobby-Kim: "U07BJABU6G1"
U07BJABU6G1: "BE팀 도비"
Chocochip101: "U07BUEJDS8G"
U07BUEJDS8G: "BE팀 초코칩"
xogns1514: "U07AZ26UC2J"
U07AZ26UC2J: "BE팀 러쉬"
cutehumanS2: "U07B88ZQDU4"
U07B88ZQDU4: "BE팀 냥인"
HyungHoKim00: "U07B5HBKZM1"
U07B5HBKZM1: "BE팀 명오"

jobs:
review-requested_requested:
if: github.event.action == 'review_requested'
runs-on: ubuntu-latest
steps:
- name: Set reviewer and sender variables
id: set-vars
run: |
echo "REVIEWER_SLACK_ID=${{ env[github.event.requested_reviewer.login] }}" >> $GITHUB_ENV
echo "SENDER_SLACK_ID=${{ env[github.event.sender.login] }}" >> $GITHUB_ENV

- name: pr reviewe 요청 시 slack 알림 보내기
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: ${{ secrets.REVIEW_MENTION_CHANNEL_ID }}
payload: |
{
"text": "✨PR 리뷰 요청✨",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": " 〰️〰️〰️〰️〰️〰️〰️〰️〰️ \n ✨✨✨✨✨✨\n✨리뷰요청✨\n✨✨✨✨✨✨ \n <@${{ env.SENDER_SLACK_ID }}> ➡️ <@${{ env.REVIEWER_SLACK_ID }}> \n\n 💡${{ github.event.pull_request.title }}💡에 대한 리뷰 요청 도착! \n 아래의 링크에서 확인주세요 \n \n ⚡️ <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }} - 바로가기>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

review-submitted_alert:
if: github.event.action == 'submitted' && github.event.review.state != 'APPROVED'
runs-on: ubuntu-latest
steps:
- name: Set reviewer and reviewee variables
id: set-vars
run: |
echo "REVIEWER_SLACK_ID=${{ env[github.event.sender.login] }}" >> $GITHUB_ENV
echo "ASSIGNEE_SLACK_ID=${{ env[github.event.pull_request.login] }}" >> $GITHUB_ENV

- name: pr 리뷰 완료 후 submit되면 reviewee에게 slack 알림 발송
if: env.ASSIGNEE_SLACK_ID != ''
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: ${{ secrets.REVIEW_MENTION_CHANNEL_ID }}
payload: |
{
"text": "🔥${{ github.event.pull_request.title }}: 리뷰 도착🔥",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": " 〰️〰️〰️〰️〰️〰️〰️〰️〰️ \n 🔥🔥🔥🔥🔥🔥\n🔥리뷰완료🔥\n🔥🔥🔥🔥🔥🔥 \n <@${{ env.REVIEWER_SLACK_ID }}> ➡️ <@${{ env.ASSIGNEE_SLACK_ID }}> \n 💡${{ github.event.pull_request.title }}💡에 대한 리뷰 도착! \n ✨ 아래의 링크에서 확인해주세요 :muscle::muscle: \n \n ⚡️ <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }} - 바로가기>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

pr-approved_alert:
if: github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest
steps:
- name: Set assignee variables
id: set-vars
run: |
echo "ASSIGNEE_SLACK_ID=${{ env[github.event.pull_request.assignee.login] }}" >> $GITHUB_ENV

- name: pr reviewer가 Approve 하면 slack 알림 보냄
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: ${{ secrets.TASK_COMPLETE_SLACK_CHANNEL_ID }}
payload: |
{
"text": "🏁 ${{ github.event.pull_request.title }}: Approve 알림🏁",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": " 〰️〰️〰️〰️〰️〰️〰️〰️〰️ \n🏁🏁🏁🏁🏁\n 🏁PR승인🏁 \n🏁🏁🏁🏁🏁\n <@${{ env.ASSIGNEE_SLACK_ID }}> 님! \n 🚀 작업하신 **${{ github.event.pull_request.title }}** 가 Approve 됐어요! \n :muscle: 아래의 링크에서 Merge를 진행해주세요 \n \n ⚡️ <${{ github.event.pull_request.html_url }}|PR 바로가기 링크>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
64 changes: 64 additions & 0 deletions .github/workflows/cd-be-dev-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build and Deploy

on:
workflow_dispatch:
push:
branches: be/main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Build project using Gradle
run: ./gradlew clean bootJar

- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: cruru-be-develop-jar
path: build/libs/cruru-0.0.1-SNAPSHOT.jar

deploy:
runs-on: self-hosted
needs: build

steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: cruru-be-develop-jar
path: ./build/libs

- name: Check if room-esc server is running on port 8080
id: check-server-on-port
run: |
echo "Checking if port 8080 is in use..."
PID=$(lsof -t -i:8080 || true)
if [ -n "$PID" ]; then
echo "server_running=true" >> $GITHUB_ENV
echo "PID=$PID" >> $GITHUB_ENV
else
echo "server_running=false" >> $GITHUB_ENV
fi

- name: Stop server if running
if: env.server_running == 'true'
run: |
echo "Stopping server running on port 8080..."
kill -9 $PID
echo "Preivous running Server stopped."

- name: Start server
run: |
nohup java -jar build/libs/cruru-0.0.1-SNAPSHOT.jar &
echo "Lastest Backend API Server started."
Loading