Skip to content

Commit

Permalink
Merge pull request #611 from boostcampwm2023/dev
Browse files Browse the repository at this point in the history
release v1.0.2
  • Loading branch information
HeoJiye authored Mar 8, 2024
2 parents d19d03f + 30d7b9a commit 6f8c925
Show file tree
Hide file tree
Showing 169 changed files with 6,239 additions and 6,934 deletions.
6 changes: 1 addition & 5 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ template: |
# Changes (v$RESOLVED_VERSION)
$CHANGES
footer: |
### Contributors
$CONTRIBUTORS
categories:
- title: "🚀 Features"
collapse-after: 15
Expand All @@ -22,7 +18,7 @@ categories:
labels:
- "refactor"
change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
change-title-escapes: '\<*_&#/@[]'
change-title-escapes: '\<*_&'
version-resolver:
major:
labels:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/add-issue-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20

- uses: actions/add-to-project@v0.5.0
with:
project-url: https://github.com/orgs/boostcampwm2023/projects/${{ env.PROJECT_NUMBER }}
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/assert-branch-naming.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/blue-green-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ env:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend

steps:
- name: Checkout code
Expand All @@ -38,7 +35,7 @@ jobs:
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
source: "backend/.env,backend/deploy.sh,backend/send-slack-message.sh,backend/compose.blue-deploy.yml,backend/compose.green-deploy.yml,backend/Dockerfile.nginx"
source: "backend/.env,backend/*.sh,backend/compose*deploy.yml,backend/*nginx*"
target: "~/app/"
overwrite: true

Expand All @@ -60,6 +57,10 @@ jobs:
- name: Build & Push Docker Images (Blue & Green)
run: |
cp package.json backend/package.json
cp package-lock.json backend/package-lock.json
cp -r packages backend/packages
cd backend
docker-compose -f compose.blue-build.yml build --builder buildx --build-arg BUILDKIT_INLINE_CACHE=1
docker-compose -f compose.green-build.yml build --builder buildx --build-arg BUILDKIT_INLINE_CACHE=1
docker-compose -f compose.blue-build.yml push
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Backend Build
on:
pull_request:
types: [opened, edited]
paths: ["backend/**"]

env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
Expand All @@ -12,9 +11,6 @@ jobs:
build:
runs-on: ubuntu-latest
if: github.event.pull_request.base.ref == 'dev'
defaults:
run:
working-directory: ./backend

steps:
- name: Checkout code
Expand All @@ -41,5 +37,9 @@ jobs:
- name: Build & Push Docker Cache
run: |
cp package.json backend/package.json
cp package-lock.json backend/package-lock.json
cp -r packages backend/packages
cd backend
docker-compose -f compose.cache-export.yml build --builder buildx --build-arg BUILDKIT_INLINE_CACHE=1
docker-compose -f compose.cache-export.yml push
5 changes: 5 additions & 0 deletions .github/workflows/configure-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Check PR title
uses: deepakputhraya/action-pr-title@master
with:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: release-drafter/release-drafter@v5
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Update Release Drafter
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }}
20 changes: 16 additions & 4 deletions backend/was/.gitignore → .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
.env
.env*
*.local

*.pem
*.eslintcache

# compiled output
/dist
/node_modules
*/dist
*/**/dist
*/dist-ssr
*node_modules

# Logs
logs
Expand Down Expand Up @@ -34,4 +40,10 @@ lerna-debug.log*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/extensions.json

*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged
14 changes: 14 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env sh

. "$(dirname -- "$0")/_/husky.sh"

BRANCH=$(git rev-parse --abbrev-ref HEAD)

ALLOWED_BRANCH_PATTERN="^(BE|FE|DEVOPS|BE,FE|FE,BE)\/(feature|bugfix|hotfix|refactor)(,(feature|bugfix|hotfix|refactor))*\/#[0-9]+(-#[0-9]+)*.+$"

if ! [[ $BRANCH =~ $ALLOWED_BRANCH_PATTERN ]]; then
echo "Error: You are not allowed to push to the branch \"$BRANCH\""
exit 1
fi

exit 0
2 changes: 1 addition & 1 deletion backend/Dockerfile.nginx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM nginx:1.18.0

COPY config/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --link nginx/default.conf /etc/nginx/conf.d/default.conf

CMD ["nginx", "-g", "daemon off;"]
11 changes: 11 additions & 0 deletions backend/Dockerfile.signal
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@ FROM node:20

RUN apt-get update && apt-get install -y tini

WORKDIR /app

COPY package*.json ./
RUN npm ci

COPY packages ./
RUN npm run build-prod:logger
RUN npm run build-prod:event

WORKDIR /app/signal

COPY signal/package*.json ./
RUN npm ci
RUN mv ../socket-event/dist ./node_modules/socket-event
RUN mv ../winston-logger/dist ./node_modules/winston-logger

COPY signal .
RUN npm run build
Expand Down
11 changes: 11 additions & 0 deletions backend/Dockerfile.was
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@ FROM node:20

RUN apt-get update && apt-get install -y tini

WORKDIR /app

COPY package*.json ./
RUN npm ci

COPY packages ./
RUN npm run build-prod:logger
RUN npm run build-prod:event

WORKDIR /app/was

COPY was/package*.json ./
RUN npm ci
RUN mv ../socket-event/dist ./node_modules/socket-event
RUN mv ../winston-logger/dist ./node_modules/winston-logger

COPY was .
RUN npm run build
Expand Down
File renamed without changes.
10 changes: 8 additions & 2 deletions backend/signal/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'airbnb',
'airbnb-typescript',
],
root: true,
env: {
Expand All @@ -19,9 +17,17 @@ module.exports = {
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'no-console': 'warn',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
},
};
37 changes: 0 additions & 37 deletions backend/signal/.gitignore

This file was deleted.

Loading

0 comments on commit 6f8c925

Please sign in to comment.