Skip to content

Commit

Permalink
Merge branch 'release/1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaesung committed Sep 15, 2022
2 parents 6e94dce + 58ba2d1 commit 5369147
Show file tree
Hide file tree
Showing 32 changed files with 406 additions and 198 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/dev_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,24 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

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

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

- name: Build with Gradle
run: ./gradlew build
shell: bash

- name: Make Directory for deliver
run: mkdir deploy

- name: Copy Jar
run: cp ./module-web/build/libs/*.jar ./deploy/

# appspec.yml Copy
- name: Copy appspec
run: cp ./appspec.yml ./deploy/

# Dockerfile Copy
- name: Copy Dockerfile
run: |
cp ./dockerfile ./deploy/
cp ./docker-compose.yml ./deploy/
run: cp ./docker-compose.yml ./deploy/

# script file Copy
- name: Copy shell
run: |
mkdir deploy/scripts
cp ./scripts/* ./deploy/scripts/
- name: Copy Jar
run: cp ./module-web/build/libs/*.jar ./deploy/

- name: Make zip file
run: zip -r ./$GITHUB_SHA.zip ./deploy/
shell: bash
Expand All @@ -67,6 +46,11 @@ jobs:
aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Setup CodeBuild
uses: aws-actions/[email protected]
with:
project-name: ygtang-develop-build

- name: Upload to S3
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$PROJECT_LOCATION/$PROJECT_NAME/$GITHUB_SHA.zip

Expand Down
27 changes: 18 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
pull_request:
branches:
- 'develop'
types: [opened, synchronize, reopened]

jobs:
build:
Expand All @@ -17,16 +18,24 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

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

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash

- name: Build with Gradle
run: ./gradlew build
shell: bash
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: chmod +x ./gradlew && ./gradlew build sonarqube --info
41 changes: 14 additions & 27 deletions .github/workflows/prod_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,39 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

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

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

- name: Build with Gradle
run: ./gradlew build
shell: bash

- name: Make Directory for deliver
run: mkdir deploy

- name: Copy Jar
run: cp ./module-web/build/libs/*.jar ./deploy/

# appspec.yml Copy
- name: Copy appspec
run: cp ./appspec.yml ./deploy/

# Dockerfile Copy
- name: Copy Dockerfile
run: |
cp ./dockerfile ./deploy/
cp ./docker-compose.yml ./deploy/
run: cp ./docker-compose.yml ./deploy/

# script file Copy
- name: Copy shell
run: |
mkdir deploy/scripts
cp ./scripts/* ./deploy/scripts/
- name: Make zip file
- name: Make zip file
run: zip -r ./$GITHUB_SHA.zip ./deploy/
shell: bash
shell: bash

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Setup CodeBuild
uses: aws-actions/[email protected]
with:
project-name: ygtang-build-production

- name: Upload to S3
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$PROJECT_LOCATION/$PROJECT_NAME/$GITHUB_SHA.zip
Expand Down
57 changes: 34 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
고은정
</a>
</td>

<td align=center>
<a href="https://github.com/hyesungoh">
<img src="https://avatars.githubusercontent.com/u/26461307?v=4" width="100px" />
Expand All @@ -142,7 +142,7 @@
오혜성
</a>
</td>

<td align=center>
<a href="https://github.com/SenseCodeValue">
<img src="https://avatars.githubusercontent.com/u/59507527?v=4" width="100px" />
Expand All @@ -152,7 +152,7 @@
정대윤
</a>
</td>

<td align=center>
<a href="https://github.com/ddarkr">
<img src="https://avatars.githubusercontent.com/u/6638675?v=4" width="100px" />
Expand All @@ -162,21 +162,9 @@
정도현
</a>
</td>

<td align=center>
<a href="https://linktr.ee/kzmgy">
<img src="https://user-images.githubusercontent.com/26461307/171999525-9e8f67d7-94e7-40e2-af81-f5ef23d41183.png" width="100px" />
<br/>
Design 🎨
<br/>
김자영
</a>
</td>

</tr>

<tr>

</tr>
<tr>

<td align=center>
<a href="https://github.com/nature1216">
<img src="https://avatars.githubusercontent.com/u/63771579?v=4" width="100px" />
Expand All @@ -186,7 +174,7 @@
김자연
</a>
</td>

<td align=center>
<a href="https://github.com/IW-MOON">
<img src="https://avatars.githubusercontent.com/u/72685070?v=4" width="100px" />
Expand All @@ -196,7 +184,7 @@
문인우
</a>
</td>

<td align=center>
<a href="https://github.com/Hyung1Jung">
<img src="https://avatars.githubusercontent.com/u/43127088?v=4" width="100px" />
Expand All @@ -206,7 +194,30 @@
정형일
</a>
</td>

<td align=center>
<a href="https://github.com/junhaesung">
<img src="https://avatars.githubusercontent.com/junhaesung" width="100px" />
<br/>
BE 💾
<br/>
전해성
</a>
</td>


</tr>

<tr>

<td align=center>
<a href="https://linktr.ee/kzmgy">
<img src="https://user-images.githubusercontent.com/26461307/171999525-9e8f67d7-94e7-40e2-af81-f5ef23d41183.png" width="100px" />
<br/>
Design 🎨
<br/>
김자영
</a>
</td>
<td align=center>
<a href="https://www.behance.net/sypak120c57e">
<img src="https://user-images.githubusercontent.com/26461307/171999527-4c959b86-221a-4f5d-add1-1b536d798c01.png" width="100px" />
Expand All @@ -216,7 +227,7 @@
박수연
</a>
</td>

<td align=center>
<a href="https://www.behance.net/misukj12240ed5">
<img src="https://user-images.githubusercontent.com/26461307/171999522-4e9d04c5-60b5-4740-9b8d-7efd84555775.png" width="100px" />
Expand All @@ -228,5 +239,5 @@
</td>

</tr>

</table>
7 changes: 2 additions & 5 deletions appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ permissions:

hooks:
ApplicationStart:
- location: scripts/run_new_was.sh
- location: scripts/deploy.sh
timeout: 200
runas: ubuntu
- location: scripts/health_check.sh
timeout: 200
runas: ubuntu
#- location: scripts/switch.sh
# timeout: 180
#cd bu runas: ubuntu
runas: ubuntu
24 changes: 23 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,27 @@ buildscript {
}

plugins {
id "com.gorylenko.gradle-git-properties" version "$gradleGitPropertiesPluginVersion" apply false
id "org.sonarqube" version "$sonarqubeVersion"
}

sonarqube {
properties {
property "sonar.projectKey", "ygtang-server"
property "sonar.organization", "yeonggamt"
property "sonar.host.url", "https://sonarcloud.io"
}
}

subprojects {
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'jacoco'

jacoco {
toolVersion = "$jacocoVersion"
}

group = 'com.depromeet.inspiration'
version = '0.0.1'
Expand All @@ -49,5 +62,14 @@ subprojects {
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
csv.required = false
html.required = false
}
}
}
38 changes: 5 additions & 33 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,13 @@
version: "3"
version: "3.9"
services:
spring1:
build: .
image: ${PROJECT_NAME}-${VERSION}
app:
image: "${IMAGE_REPO_NAME}:${IMAGE_TAG}"
container_name: ${ACTIVE}
ports:
- "8080:8080"
- "8081:8081"
- "5005:5005"
volumes:
- ./:/root/
- "${YGTANG_LOG_DIR}:/logs"
environment:
- "JAVA_OPTS=${JAVA_OPTS}"
- "PROJECT_NAME=${PROJECT_NAME}"
- "VERSION=${VERSION}"
- "DEV_PORT=${DEV_PORT}"
- "ACTIVE=${ACTIVE}"
- "ERROR_LOG_POST_SLACK_URL=${ERROR_LOG_POST_SLACK_URL}"
- "DB_HOST=${DB_HOST}"
- "DB_PORT=${DB_PORT}"
- "DB_USER=${DB_USER}"
- "DB_PASSWORD=${DB_PASSWORD}"
- "REDIS_HOST=${REDIS_HOST}"
- "REDIS_PORT=${REDIS_PORT}"
- "MAIL_HOST=${MAIL_HOST}"
- "MAIL_PORT=${MAIL_PORT}"
- "MAIL_USERNAME=${MAIL_USERNAME}"
- "MAIL_PASSWORD=${MAIL_PASSWORD}"
- "SIGN_UP_EMAIL_SEND_MAIL=${SIGN_UP_EMAIL_SEND_MAIL}"
- "RESET_PASSWORD_FOR_AUTH_SEND_MAIL=${RESET_PASSWORD_FOR_AUTH_SEND_MAIL}"
- "AUTH_TOKEN=${AUTH_TOKEN}"
- "POLICY_URL=${POLICY_URL}"
- "SECRET_KEY=${SECRET_KEY}"
- "S3_ACCESS_KEY=${S3_ACCESS_KEY}"
- "S3_SECRET_KEY=${S3_SECRET_KEY}"
- "S3_REGION=${S3_REGION}"
- "S3_BUCKET=${S3_BUCKET}"
- "YGTANG_SERVER_HOST=${YGTANG_SERVER_HOST}"


- "JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Dspring.profiles.active=${ACTIVE} -Duser.timezone=Asia/Seoul -Djasypt.encryptor.password=${ENC_PASSWORD} -Dserver.tomcat.accesslog.enabled=true -Dserver.tomcat.basedir=/ -Dlogging.level.org.apache.catalina.core=OFF -Dlogging.file.name=/logs/spring.log"
Loading

0 comments on commit 5369147

Please sign in to comment.