Skip to content

Commit

Permalink
Merge pull request #17 from lotteon2/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
nowgnas authored Jan 18, 2024
2 parents 7952f4e + 346a543 commit c188703
Show file tree
Hide file tree
Showing 58 changed files with 3,304 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name-template: "order query v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🆕 새로운 기능이 추가되었어요!"
label: "✨ Feature"
- title: "🐞 자잘한 버그를 수정했습니다."
label: "🐞 Bugfix"
- title: "🫶🏻 앱 사용성 개선에 힘썼습니다."
label: "🫶🏻 Improvement"
- title: "🛠️ 더 나은 코드를 위해 노력하고 있습니다."
labels:
- "🔨 Refactor"
- "⚙️ Setting"
- title: "ETC"
labels:
- "*"
change-template: "* $TITLE (#$NUMBER) by @$AUTHOR"
change-title-escapes: '\<*_&#@`'
exclude-labels:
- "Main"
version-resolver:
major:
labels:
- "Major"
minor:
labels:
- "Minor"
patch:
labels:
- "Patch"
default: patch
template: |
$CHANGES
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

# Gradle wrapper 파일 실행 권한주기
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Gradle test를 실행한다
- name: build gradle
run: ./gradlew clean build
run: ./gradlew clean build
9 changes: 6 additions & 3 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: develop deployment
on:
push:
branches:
- 'develop'
jobs:
build-and-push-docker-image:
deployment:
environment: develop
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -15,9 +17,10 @@ jobs:
with:
username: ${{ secrets.DEV_DOCKER_ID }}
password: ${{ secrets.DEV_DOCKER_PW }}
- name: Build and push
- name: deploy
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
tags: nowgnas/bb:store
tags: nowgnas/bb:order-query
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release Tag

on:
push:
branches:
- main

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
config-name: release.yml
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}

deployment:
name: Setup, Build, and Deploy
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
id-token: write
steps:
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

# Set the new tag as a variable
- name: Set New Tag Variable
id: set_new_tag
run: echo "NEW_TAG=${{ steps.tag_version.outputs.new_tag }}" >> $GITHUB_ENV

- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
- name: Checkout
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DEV_DOCKER_ID }}
password: ${{ secrets.DEV_DOCKER_PW }}

- name: deploy
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
tags: nowgnas/bb-orderquery:${{ steps.tag_version.outputs.new_tag }}, nowgnas/bb-orderquery:latest
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM amazoncorretto:17.0.7-alpine AS builder
ENV USE_PROFILE local

COPY gradlew .
COPY gradle gradle
COPY build.gradle .
COPY settings.gradle .
COPY src src
RUN chmod +x ./gradlew
RUN ./gradlew clean bootJar

FROM amazoncorretto:17.0.7-alpine
COPY --from=builder build/libs/*.jar app.jar

ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=${USE_PROFILE}", "/app.jar"]
74 changes: 74 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.17'
id 'io.spring.dependency-management' version '1.1.4'
}

group = 'kr.bb'
version = '0.0.1-SNAPSHOT'

java {
sourceCompatibility = '17'
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}

}


configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

ext {
set('springCloudVersion', "2021.0.8")
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation "org.springframework.cloud:spring-cloud-starter-bus-kafka"
implementation 'org.springframework.kafka:spring-kafka'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
implementation 'io.micrometer:micrometer-registry-prometheus:1.12.2'

// sqs
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.4.RELEASE'
implementation 'org.springframework.cloud:spring-cloud-aws-messaging:2.2.4.RELEASE'
implementation 'software.amazon.awssdk:sns:2.21.37'

// dynamoDB
implementation 'io.github.boostchicken:spring-data-dynamodb:5.2.5'
implementation 'software.amazon.awssdk:dynamodb:2.17.267'

// testContainers
testImplementation "org.junit.jupiter:junit-jupiter:5.8.1"
testImplementation "org.testcontainers:junit-jupiter:1.16.3"

implementation group: 'io.github.lotteon-maven', name: 'blooming-blooms-utils', version: '202401160417'
}

dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}

tasks.named('bootBuildImage') {
builder = 'paketobuildpacks/builder-jammy-base:latest'
}

tasks.named('test') {
useJUnitPlatform()
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit c188703

Please sign in to comment.