Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #8

Merged
merged 52 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
44d9250
:wrench: LF1-24 #resolve add dockerfile
nowgnas Nov 18, 2023
66d3149
:heavy_minus_sign: Remove dev tools
nowgnas Nov 18, 2023
2761eb6
:memo: Amend ignore file
nowgnas Nov 19, 2023
1f9ef17
Create deploy-dev.yml
nowgnas Nov 25, 2023
0ca6354
Create build.yml
nowgnas Nov 25, 2023
3f23909
Merge pull request #2 from lotteon2/nowgnas-patch-1
nowgnas Nov 27, 2023
05d2ae9
Merge branch 'develop' into config/init
nowgnas Dec 2, 2023
c6787a9
Delete src/test/java/kr/bb/apigateway/ApigatewayServiceApplicationTes…
nowgnas Dec 2, 2023
4473a58
Merge pull request #1 from nowgnas/config/init
JIUNG9 Dec 7, 2023
5350174
add: add the filters and valueObject which needs for setting Gateway
JIUNG9 Dec 7, 2023
5ebd736
refactor: refactor Extract token util
JIUNG9 Dec 7, 2023
69bfb3f
feat: add the filters which needs for routing
JIUNG9 Dec 7, 2023
b535681
fix: fix wrong path of package
JIUNG9 Dec 7, 2023
cdae665
add: add the kafka dependecy
JIUNG9 Dec 7, 2023
1cdda54
fix: fix JwtUtil Access token expiration time
JIUNG9 Dec 7, 2023
238850f
Merge pull request #3 from lotteon2/develop-gateway-filter
nowgnas Dec 7, 2023
8477d82
fix: fix the JwtUtil use second
JIUNG9 Dec 7, 2023
1ce8ffe
Merge branch 'develop' into develop-gateway-filter
nowgnas Dec 7, 2023
6ac4fa3
Merge pull request #4 from lotteon2/develop-gateway-filter
nowgnas Dec 7, 2023
6bef661
:wrench: Amend application yml
nowgnas Dec 11, 2023
ba365a5
Merge pull request #5 from nowgnas/develop
JIUNG9 Dec 11, 2023
607cfda
add: add the redis configuration
JIUNG9 Dec 11, 2023
be383dd
add: add the cofig
JIUNG9 Dec 11, 2023
f7c9a84
add: add the cloud config yml
JIUNG9 Dec 11, 2023
2604602
remove: remove the shouldNoFilter at Filter
JIUNG9 Dec 13, 2023
c5e67a8
Revert "remove: remove the shouldNoFilter at Filter"
JIUNG9 Dec 13, 2023
59a211c
fix: fix the if statement
JIUNG9 Dec 13, 2023
d38f024
chore: add the log
JIUNG9 Dec 13, 2023
db5b51e
fix: fix component to configuration
JIUNG9 Dec 13, 2023
8e7a458
fix: fix the should be passed URI not come through the filters
JIUNG9 Dec 13, 2023
160ba62
add: the shouldNotFilter OAuth and Favicon
JIUNG9 Dec 14, 2023
c936d87
fix: temporary disable the filters
JIUNG9 Dec 14, 2023
e06dcb5
fix: temporary make disable the filters
JIUNG9 Dec 14, 2023
a2278ec
fix: disable rest of filter
JIUNG9 Dec 14, 2023
548a9c9
fix: fix to disable csrf token
JIUNG9 Dec 14, 2023
9d03037
revert: not to use the filter
JIUNG9 Dec 14, 2023
edd996d
refactor: refactor the gateway
JIUNG9 Dec 15, 2023
325f73f
Merge pull request #6 from lotteon2/develop-gateway-refactoring
nowgnas Dec 15, 2023
d267d66
update deploy dev
nowgnas Dec 15, 2023
b515fe1
Merge remote-tracking branch 'origin/develop' into develop
nowgnas Dec 15, 2023
005bc91
fix: fix the filter config
JIUNG9 Dec 15, 2023
d3e3abd
feat: add the gatway JWT token optionalFilter
JIUNG9 Dec 18, 2023
0120f29
add: add the socialOptionalAuthorizationGatewayFilter
JIUNG9 Dec 18, 2023
162998d
refactor: refactor JwtUtil use the encrpyted key not Secret api
JIUNG9 Dec 18, 2023
9eb2954
refactor: refactor the Authorization filter
JIUNG9 Dec 19, 2023
a45361f
remove: remove un-neccesary dependency
JIUNG9 Dec 19, 2023
3f95612
Merge pull request #7 from lotteon2/develop-gateway-refactor
nowgnas Dec 19, 2023
c151103
add: add the redis config
JIUNG9 Dec 19, 2023
718db55
refactor: refactor the jedis config to redis config
JIUNG9 Dec 19, 2023
6bca27d
fix: fix the redis key type
JIUNG9 Dec 19, 2023
be33422
:bookmark: Add release
nowgnas Jan 3, 2024
4325e85
:bookmark: Add release change log automation
nowgnas Jan 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: "apigateway 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
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: PR build


on:
pull_request:
branches: [ develop ] # develop branch에 PR을 보낼 때 실행

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

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

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

# Gradle test를 실행한다
- name: build gradle
run: ./gradlew clean build
26 changes: 26 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: develop deployment
on:
push:
branches:
- 'develop'
jobs:
deployment:
environment: develop
runs-on: ubuntu-latest
steps:
- 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:apigateway
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-apigateway:${{ steps.tag_version.outputs.new_tag }}, nowgnas/bb-apigateway:latest
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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/
*.DS_Store
docker.sh
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM adoptopenjdk:11-hotspot 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 adoptopenjdk:11-hotspot
COPY --from=builder build/libs/*.jar app.jar

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

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

java {
sourceCompatibility = '11'
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

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

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-gateway'
implementation 'org.springframework.boot:spring-boot-starter-web'
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.data:spring-data-redis'
implementation 'org.springframework.kafka:spring-kafka'
implementation 'redis.clients:jedis'
implementation 'org.springframework.boot:spring-boot-starter-data-redis-reactive'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.1'
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.2'
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.2'

}

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.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading