-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from Myongji-Graduate/develop
졸업을 부탁해 V2.1
- Loading branch information
Showing
376 changed files
with
6,733 additions
and
3,460 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
files: | ||
"/sbin/appstart" : | ||
mode: "000755" | ||
owner: webapp | ||
group: webapp | ||
content: | | ||
#!/usr/bin/env bash | ||
JAR_PATH=/var/app/current/application.jar | ||
|
||
# run app | ||
killall java | ||
java -Dfile.encoding=UTF-8 -Dspring.profiles.active=dev -jar $JAR_PATH |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
commands: | ||
set_time_zone: | ||
command: ln -f -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: dev-depoly | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x ./gradlew | ||
shell: bash | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew clean build | ||
shell: bash | ||
|
||
- name: Get current time | ||
uses: 1466587594/get-current-time@v2 | ||
id: current-time | ||
with: | ||
format: YYYY-MM-DDTHH-mm-ss | ||
utcOffset: "+09:00" # 한국 시간에 맞추기 위함 | ||
|
||
# grandle build를 통해 만들어진 jar를 beanstalk에 배포하기 위한 zip 파일로 만드는 것 | ||
- name: Generate deployment package | ||
run: | | ||
mkdir -p deploy | ||
cp build/libs/*.jar deploy/application.jar | ||
cp Procfile deploy/Procfile | ||
cp -r .ebextensions deploy/.ebextensions | ||
cp -r .platform deploy/.platform | ||
cd deploy && zip -r deploy.zip . | ||
# Beanstalk Deploy 플러그인 사용 | ||
- name: Beanstalk Deploy | ||
uses: einaregilsson/beanstalk-deploy@v21 | ||
with: | ||
aws_access_key: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} # github secrets로 등록한 값 사용 | ||
aws_secret_key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} # github secrets로 등록한 값 사용 | ||
application_name: staging-plzgraduation # EB application 이름 | ||
environment_name: staging-plzgraduation-env # EB environment 이름 | ||
version_label: Github Action-${{steps.current-time.outputs.formattedTime}} # 배포 버전은 타임스탬프를 이용하여 구분 | ||
region: ap-northeast-2 | ||
deployment_package: deploy/deploy.zip | ||
wait_for_environment_recovery: 180 | ||
|
||
- name: Test with Gradle | ||
run: ./gradlew test --no-daemon |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: PR Label Automation | ||
on: | ||
schedule: | ||
- cron: '0 10 * * *' | ||
|
||
jobs: | ||
update-labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check and Update PR Labels | ||
uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
const repo = context.repo; | ||
// Fetch all open PRs | ||
const prs = await github.rest.pulls.list({ | ||
owner: repo.owner, | ||
repo: repo.repo, | ||
state: 'open', | ||
}); | ||
// Define the Discord webhook URL | ||
const webhookUrl = 'https://discord.com/api/webhooks/1198592354127458326/mighz1RApMReApkYxMy0mJHI97du_nWnBRymuRLldMqgvRDNCme2RIW0fDtS3nEZAKip'; | ||
for (const pr of prs.data) { | ||
const prNumber = pr.number; | ||
let labels = pr.labels.map(label => label.name); | ||
// Function to update label | ||
async function updateLabel(oldLabel, newLabel) { | ||
if (oldLabel) { | ||
await github.rest.issues.removeLabel({ | ||
owner: repo.owner, | ||
repo: repo.repo, | ||
issue_number: prNumber, | ||
name: oldLabel, | ||
}); | ||
} | ||
await github.rest.issues.addLabels({ | ||
owner: repo.owner, | ||
repo: repo.repo, | ||
issue_number: prNumber, | ||
labels: [newLabel], | ||
}); | ||
} | ||
// Check and update 'D-x' labels | ||
let dLabel = labels.find(label => label.startsWith("D-")); | ||
if (dLabel) { | ||
let day = parseInt(dLabel.split("-")[1]); | ||
if (day > 0) { | ||
const newDayLabel = `D-${day - 1}`; | ||
await updateLabel(dLabel, newDayLabel); | ||
console.log(`Updated label from ${dLabel} to ${newDayLabel} on PR #${prNumber}`); | ||
await fetch(webhookUrl, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
content: `Attention! PR #${prNumber} has ${day - 1} day(s) left before the deadline.`, | ||
}), | ||
}); | ||
} else if (day === 0) { | ||
await fetch(webhookUrl, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
content: `Urgent! PR #${prNumber} is due today!`, | ||
}), | ||
}); | ||
} | ||
} else { | ||
await updateLabel(null, 'D-5'); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,9 @@ jobs: | |
# Gradle test를 실행 후 report 추출 | ||
- name: Test with Gradle | ||
run: ./gradlew build jacocoTestReport | ||
|
||
# report 업로드하기 | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ TYPE_LIST=( | |
style | ||
chore | ||
test | ||
build | ||
docs | ||
) | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
user nginx; | ||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
worker_processes auto; | ||
worker_rlimit_nofile 33282; | ||
|
||
events { | ||
use epoll; | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
include conf.d/*.conf; | ||
|
||
map $http_upgrade $connection_upgrade { | ||
default "upgrade"; | ||
} | ||
|
||
upstream springboot { | ||
server 127.0.0.1:8080; | ||
keepalive 1024; | ||
} | ||
|
||
server { | ||
listen 80 default_server; | ||
|
||
location / { | ||
proxy_pass http://springboot; | ||
proxy_http_version 1.1; | ||
proxy_set_header Connection $connection_upgrade; | ||
proxy_set_header Upgrade $http_upgrade; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
client_header_timeout 60; | ||
client_body_timeout 60; | ||
client_max_body_size 10M; | ||
keepalive_timeout 60; | ||
gzip off; | ||
gzip_comp_level 4; | ||
|
||
# Include the Elastic Beanstalk generated locations | ||
include conf.d/elasticbeanstalk/healthd.conf; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: appstart |
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.