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

Feat: 배포 방식 변경 #19

Merged
merged 21 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6ac863e
chore: docker-compose.yml 파일 수정(#17)
whereami2048 May 7, 2024
0a1c4ba
remove: deploy.sh 삭제(#17)
whereami2048 May 7, 2024
62310e1
chore: jwt 관련 상수 application.yml에 추가
whereami2048 May 7, 2024
fd77cad
chore: blue-green 배포 방식 변경에 따른 CD-dev 워크 플로우 파일 수정
whereami2048 May 7, 2024
c9e1e16
chore: 워크 플로우 파일 수정
whereami2048 May 7, 2024
731ae6f
chore: CD-dev 워크 플로우 트리거 브랜치 변경 & AuthInvoker 파일 주석 처리 해제
whereami2048 May 7, 2024
8049155
chore: jwt 관련 상수 application.yml에 추가(#17)
whereami2048 May 7, 2024
d2c689c
chore: blue-green 배포 방식 변경에 따른 CD-dev 워크 플로우 파일 수정(#17)
whereami2048 May 7, 2024
b72060c
chore: 워크 플로우 파일 수정(#17)
whereami2048 May 7, 2024
3d34e6f
chore: CD-dev 워크 플로우 트리거 브랜치 변경 & AuthInvoker 파일 주석 처리 해제(#17)
whereami2048 May 7, 2024
d1383e6
chore: CD-dev 워크 플로우 수정
whereami2048 May 7, 2024
8032d0e
chore: CD-dev 워크플로우 파일 수정
whereami2048 May 7, 2024
b3798f0
chore: CD-dev 워크 플로우 수정
whereami2048 May 7, 2024
e02e9d8
chore: CD-dev 테스트
whereami2048 May 7, 2024
7bacae3
chore: CD-dev 워크 플로우 파일 수정
whereami2048 May 7, 2024
fbdd6fe
chore: CD-dev 워크 플로우 파일 수정
whereami2048 May 7, 2024
1207f55
chore: CD-dev 워크플로우 파일 수정
whereami2048 May 7, 2024
43ca2b6
chore: CD-dev 워크 플로우 파일 수정
whereami2048 May 7, 2024
d4df7ab
chore: CD-dev 워크 플로우 파일 수정
whereami2048 May 7, 2024
3fad62b
chore: CD-dev 워크 플로우 파일 수정
whereami2048 May 7, 2024
fa95510
chore: invoke 코드 원상복구
whereami2048 May 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
7 changes: 5 additions & 2 deletions .github/workflows/CD-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CD-dev

on:
push:
branches: [ "feat/flight-17" ]
branches: [ "main" ]

permissions:
contents: read
Expand Down Expand Up @@ -84,4 +84,7 @@ jobs:
key: ${{ secrets.KEY }}
script: |
docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}
docker compose restart
docker compose stop
whereami2048 marked this conversation as resolved.
Show resolved Hide resolved
docker compose rm -f
whereami2048 marked this conversation as resolved.
Show resolved Hide resolved
docker compose up -d
docker image prune -f
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,21 @@ import org.springframework.stereotype.Component
class AuthInvoker (
private val authHandlerList: List<AuthHandler>,
private val jwtProvider: JwtProvider,
// private val userReader: UserReader
private val userReader: UserReader
) {

fun invoke(request: SocialLogin.Request, provider: SocialLoginProvider): SocialLogin.Response {
val response = attemptLogin(request, provider)
return SocialLogin.Response.UnRegistered("registrationToken", response.nickName)
// return TransactionUtils.writable {
// return@writable userReader.findBySocialIdOrNull(response.socialId)?.let {
// val accessToken = jwtProvider.generateAccessToken(Claims.UserClaims(it.id))
// val refreshToken = jwtProvider.generateRefreshToken(Claims.UserClaims(it.id))
// SocialLogin.Response.Success(accessToken, refreshToken)
// } ?: run {
// val registrationToken = jwtProvider.generateRegistrationToken(Claims.RegistrationClaims(response.socialId, provider))
// SocialLogin.Response.UnRegistered(registrationToken, response.nickName)
// }
// }
return TransactionUtils.writable {
return@writable userReader.findBySocialIdOrNull(response.socialId)?.let {
val accessToken = jwtProvider.generateAccessToken(Claims.UserClaims(it.id))
val refreshToken = jwtProvider.generateRefreshToken(Claims.UserClaims(it.id))
SocialLogin.Response.Success(accessToken, refreshToken)
} ?: run {
val registrationToken = jwtProvider.generateRegistrationToken(Claims.RegistrationClaims(response.socialId, provider))
SocialLogin.Response.UnRegistered(registrationToken, response.nickName)
}
}
}

private fun attemptLogin(request: SocialLogin.Request, provider: SocialLoginProvider): AuthHandler.Response {
Expand Down
Loading