-
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 #17 from Central-MakeUs/feature/8
Feature/8: Member κ΄λ ¨ API κ°λ°-1
- Loading branch information
Showing
32 changed files
with
867 additions
and
146 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 |
---|---|---|
@@ -1,92 +1,84 @@ | ||
#name: suppin dev Docker Beanstalk CI/CD # Workflow μ΄λ¦ | ||
# | ||
#on: | ||
# push: | ||
# branches: | ||
# - dev | ||
# pull_request: | ||
# branches: | ||
# - dev | ||
# types: [closed] | ||
# workflow_dispatch: # (2).μλ μ€νλ κ°λ₯νλλ‘ | ||
# | ||
#jobs: | ||
# build: | ||
# runs-on: ubuntu-latest # (3).OSνκ²½ | ||
# if: github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) | ||
# | ||
# | ||
# steps: | ||
# - name: Checkout current repository | ||
# 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 clean build | ||
# 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: ap-northeast-2 | ||
# | ||
# - name: Login to Amazon ECR | ||
# id: login-ecr | ||
# uses: aws-actions/amazon-ecr-login@v1 | ||
# | ||
# - name: Build, tag, and push image to Amazon ECR | ||
# id: build-image | ||
# env: | ||
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
# ECR_REPOSITORY: tree-dev | ||
# IMAGE_TAG: latest | ||
# run: | | ||
# # Docker μ΄λ―Έμ§ λΉλ | ||
# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . | ||
# | ||
# # λΉλν μ΄λ―Έμ§λ₯Ό Amazon ECRλ‘ νΈμ | ||
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
# | ||
# # λΉλλ μ΄λ―Έμ§μ μ 보 μΆλ ₯ | ||
# echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" | ||
# | ||
# - name: Get current time | ||
# uses: 1466587594/get-current-time@v2 | ||
# id: current-time | ||
# with: | ||
# format: YYYYMMDD_HH-mm-ss | ||
# utcOffset: "+09:00" | ||
# | ||
# - name: Generate deployment package | ||
# run: | | ||
# mkdir -p deploy | ||
# cp -r .ebextensions deploy/.ebextensions | ||
# cp Dockerrun.aws.json deploy/Dockerrun.aws.json | ||
# cp -r .platform deploy/.platform | ||
# cd deploy && zip -r deploy.zip . | ||
# | ||
# - name: Beanstalk Deploy | ||
# uses: einaregilsson/beanstalk-deploy@v14 | ||
# with: | ||
# aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
# aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
# application_name: suppin-dev | ||
# environment_name: suppin-dev-env | ||
# version_label: github-action-${{ steps.current-time.outputs.formattedTime }} | ||
# region: ap-northeast-2 | ||
# deployment_package: deploy/deploy.zip | ||
# wait_for_deployment: false | ||
# | ||
# | ||
# | ||
# | ||
name: suppin dev Docker Beanstalk CI/CD # Workflow μ΄λ¦ | ||
|
||
on: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest # (3).OSνκ²½ | ||
if: github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) | ||
|
||
|
||
steps: | ||
- name: Checkout current repository | ||
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 clean build | ||
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: ap-northeast-2 | ||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
|
||
- name: Build, tag, and push image to Amazon ECR | ||
id: build-image | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
ECR_REPOSITORY: tree-dev | ||
IMAGE_TAG: latest | ||
run: | | ||
# Docker μ΄λ―Έμ§ λΉλ | ||
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . | ||
# λΉλν μ΄λ―Έμ§λ₯Ό Amazon ECRλ‘ νΈμ | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
# λΉλλ μ΄λ―Έμ§μ μ 보 μΆλ ₯ | ||
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" | ||
- name: Get current time | ||
uses: 1466587594/get-current-time@v2 | ||
id: current-time | ||
with: | ||
format: YYYYMMDD_HH-mm-ss | ||
utcOffset: "+09:00" | ||
|
||
- name: Generate deployment package | ||
run: | | ||
mkdir -p deploy | ||
cp -r .ebextensions deploy/.ebextensions | ||
cp Dockerrun.aws.json deploy/Dockerrun.aws.json | ||
cp -r .platform deploy/.platform | ||
cd deploy && zip -r deploy.zip . | ||
- name: Beanstalk Deploy | ||
uses: einaregilsson/beanstalk-deploy@v14 | ||
with: | ||
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
application_name: suppin-dev | ||
environment_name: suppin-dev-env | ||
version_label: github-action-${{ steps.current-time.outputs.formattedTime }} | ||
region: ap-northeast-2 | ||
deployment_package: deploy/deploy.zip | ||
wait_for_deployment: false | ||
|
||
|
||
|
||
|
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 |
---|---|---|
@@ -1,49 +1,54 @@ | ||
plugins { | ||
id 'java' | ||
id 'org.springframework.boot' version '2.7.7' | ||
id 'io.spring.dependency-management' version '1.1.4' | ||
id 'java' | ||
id 'org.springframework.boot' version '3.2.8' | ||
id 'io.spring.dependency-management' version '1.1.6' | ||
} | ||
|
||
group = 'com.cmc' | ||
version = '0.0.1-SNAPSHOT' | ||
|
||
java { | ||
sourceCompatibility = '17' | ||
targetCompatibility = '17' | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(17) | ||
} | ||
sourceCompatibility = '17' | ||
targetCompatibility = '17' | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(17) | ||
} | ||
} | ||
|
||
configurations { | ||
compileOnly { | ||
extendsFrom annotationProcessor | ||
} | ||
compileOnly { | ||
extendsFrom annotationProcessor | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'javax.servlet:javax.servlet-api:4.0.1' | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
implementation 'org.springdoc:springdoc-openapi-ui:1.6.11' | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
|
||
compileOnly 'org.projectlombok:lombok' | ||
developmentOnly 'org.springframework.boot:spring-boot-devtools' | ||
runtimeOnly 'com.mysql:mysql-connector-j' | ||
annotationProcessor 'org.projectlombok:lombok' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
implementation 'org.springframework.boot:spring-boot-starter-security' | ||
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0' | ||
|
||
// JWT dependencies | ||
implementation 'io.jsonwebtoken:jjwt-api:0.12.2' | ||
implementation 'io.jsonwebtoken:jjwt-impl:0.12.2' | ||
implementation 'io.jsonwebtoken:jjwt-jackson:0.12.2' | ||
|
||
compileOnly 'org.projectlombok:lombok' | ||
developmentOnly 'org.springframework.boot:spring-boot-devtools' | ||
runtimeOnly 'com.mysql:mysql-connector-j' | ||
annotationProcessor 'org.projectlombok:lombok' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' | ||
} | ||
|
||
tasks.named('test') { | ||
useJUnitPlatform() | ||
useJUnitPlatform() | ||
} | ||
|
||
jar { | ||
enabled = false | ||
enabled = false | ||
} |
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
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
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
6 changes: 3 additions & 3 deletions
6
src/main/java/com/cmc/suppin/global/domain/BaseDateTimeEntity.java
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
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
Oops, something went wrong.