Skip to content

Commit

Permalink
Merge pull request #312 from GEON-PPANG/init-setting
Browse files Browse the repository at this point in the history
[CHORE] DEV CI 및 CD 스크립트 변경
  • Loading branch information
seunghaLim authored Sep 21, 2024
2 parents dba1a1e + fff60ad commit d188e2c
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 53 deletions.
49 changes: 30 additions & 19 deletions .github/workflows/dev-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,49 +22,60 @@ jobs:
- name: checkout
uses: actions/checkout@v3

# 2) JDK 11버전 설치, 다른 JDK 버전을 사용하다면 수정
- name: Set up JDK 11
# 2) JDK 21버전 설치, 다른 JDK 버전을 사용하다면 수정
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '21'
distribution: 'temurin'

# 3) 환경변수 파일 생성
- name: make application.properties 파일 생성
run: |
pwd
## create application.yml in api module
## mkdir ./api/src/main/resources
cd ./api/src/main/resources
touch ./application.yml
ls -al
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
## create application.yml in client module
mkdir ./client/client-feign/src/main/resources
cd ./client/client-feign/src/main/resources
touch ./application.yml
touch ./client.yml
## create yml file in client/client-amplitude module
mkdir ./client/client-amplitude/src/main/resources
cd ./client/client-amplitude/src/main/resources
touch ./client-amplitude.yml
ls -al
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
## create yml file in client/client-apple module
mkdir ./client/client-apple/src/main/resources
cd ./client/client-apple/src/main/resources
touch ./client-apple.yml
ls -al
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
## create application.yml in storage module
## create yml file in storage/db-core module
mkdir ./storage/db-core/src/main/resources
cd ./storage/db-core/src/main/resources
touch ./application.yml
touch ./db-core.yml
touch ./storage-db-core.yml
ls -al
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
pwd
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
## create yml file in support/slack module
mkdir ./support/slack/src/main/resources
cd ./support/slack/src/main/resources
touch ./support-slack.yml
ls -al
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기
echo "${{ secrets.DEV_API_APPLICATION_YML }}" >> ./api/src/main/resources/application.yml
echo "${{ secrets.DEV_DB_CORE_APPLICATION_YML }}" >> ./storage/db-core/src/main/resources/application.yml
echo "${{ secrets.DEV_DB_CORE }}" >> ./storage/db-core/src/main/resources/db-core.yml
echo "${{ secrets.DEV_CLIENT }}" >> ./client/client-feign/src/main/resources/client.yml
echo "${{ secrets.DEV_CLIENT_APPLICATION_YML }}" >> ./client/client-feign/src/main/resources/application.yml
echo "${{ secrets.DEV_API_APPLICATION }}" >> ./api/src/main/resources/application.yml
echo "${{ secrets.DEV_STORAGE_DB_CORE }}" >> ./storage/db-core/src/main/resources/storage-db-core.yml
echo "${{ secrets.DEV_CLIENT_AMPLITUDE }}" >> ./client/client-amplitude/src/main/resources/client-amplitude.yml
echo "${{ secrets.DEV_CLIENT_APPLE }}" >> ./client/client-apple/src/main/resources/client-apple.yml
echo "${{ secrets.DEV_SUPPORT_SLACK }}" >> ./support/slack/src/main/resources/support-slack.yml
shell: bash

Expand Down
45 changes: 28 additions & 17 deletions .github/workflows/dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,49 +31,60 @@ jobs:
- name: checkout
uses: actions/checkout@v3

# 2) JDK 11버전 설치, 다른 JDK 버전을 사용하다면 수정
- name: Set up JDK 11
# 2) JDK 21버전 설치, 다른 JDK 버전을 사용하다면 수정
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '21'
distribution: 'temurin'

# 3) 환경변수 파일 생성
- name: make application.yml 파일 생성
run: |
pwd
## create application.yml in api module
## mkdir ./api/src/main/resources
cd ./api/src/main/resources
touch ./application.yml
ls -al
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
## create application.yml in client module
mkdir ./client/client-feign/src/main/resources
cd ./client/client-feign/src/main/resources
touch ./application.yml
touch ./client.yml
## create yml file in client/client-amplitude module
mkdir ./client/client-amplitude/src/main/resources
cd ./client/client-amplitude/src/main/resources
touch ./client-amplitude.yml
ls -al
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
## create yml file in client/client-apple module
mkdir ./client/client-apple/src/main/resources
cd ./client/client-apple/src/main/resources
touch ./client-apple.yml
ls -al
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
## create application.yml in storage module
## create yml file in storage/db-core module
mkdir ./storage/db-core/src/main/resources
cd ./storage/db-core/src/main/resources
touch ./application.yml
touch ./db-core.yml
touch ./storage-db-core.yml
ls -al
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
## create yml file in support/slack module
mkdir ./support/slack/src/main/resources
cd ./support/slack/src/main/resources
touch ./support-slack.yml
ls -al
cd /home/runner/work/GEON-PPANG-SERVER/GEON-PPANG-SERVER
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기
echo "${{ secrets.DEV_API_APPLICATION_YML }}" >> ./api/src/main/resources/application.yml
echo "${{ secrets.DEV_DB_CORE_APPLICATION_YML }}" >> ./storage/db-core/src/main/resources/application.yml
echo "${{ secrets.DEV_DB_CORE }}" >> ./storage/db-core/src/main/resources/db-core.yml
echo "${{ secrets.DEV_CLIENT }}" >> ./client/client-feign/src/main/resources/client.yml
echo "${{ secrets.DEV_CLIENT_APPLICATION_YML }}" >> ./client/client-feign/src/main/resources/application.yml
echo "${{ secrets.DEV_API_APPLICATION }}" >> ./api/src/main/resources/application.yml
echo "${{ secrets.DEV_STORAGE_DB_CORE }}" >> ./storage/db-core/src/main/resources/storage-db-core.yml
echo "${{ secrets.DEV_CLIENT_AMPLITUDE }}" >> ./client/client-amplitude/src/main/resources/client-amplitude.yml
echo "${{ secrets.DEV_CLIENT_APPLE }}" >> ./client/client-apple/src/main/resources/client-apple.yml
echo "${{ secrets.DEV_SUPPORT_SLACK }}" >> ./support/slack/src/main/resources/support-slack.yml
shell: bash

Expand Down
3 changes: 1 addition & 2 deletions api/src/main/java/com/org/gunbbang/service/AuthService.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public AuthService(MemberRepository memberRepository) {
this.memberRepository = memberRepository;
}

@Autowired private PasswordEncoder passwordEncoder; // TODO: final 빼고 하는게 맞을지?
@Autowired private PasswordEncoder passwordEncoder;

public abstract SignedUpMemberVO saveMemberOrLogin(
String platformToken, MemberSignUpRequestDTO request) throws Exception;
Expand All @@ -42,7 +42,6 @@ protected Member saveUser(MemberSignUpRequestDTO request, String email) {
return memberRepository.saveAndFlush(newMember);
}

// TODO!! 패스워드 인코딩 잘되는지 확인
private Member createNativeMember(MemberSignUpRequestDTO request, String email) {
final String encodedPassword = passwordEncoder.encode(request.getPassword());

Expand Down
13 changes: 0 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,15 @@ subprojects {
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
// apply plugin: 'com.diffplug.spotless'

dependencies {
// implementation 'org.springframework.boot:spring-boot-starter-web:3.3.2'
// implementation 'org.springframework.boot:spring-boot-starter-validation'
// implementation 'org.springframework.boot:spring-boot-starter-actuator'
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'org.projectlombok:lombok'
annotationProcessor "org.projectlombok:lombok-mapstruct-binding:0.2.0"

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
// implementation group: 'org.springframework', name: 'spring-web', version: '5.3.23'
// implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
}

bootJar.enabled = false
Expand All @@ -56,12 +50,5 @@ subprojects {
test {
useJUnitPlatform()
}
// java formatter용
// spotless {
// java {
// googleJavaFormat()
// }
// }

}

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface AmplitudeFeignClient {
@PostMapping(value = "/2/httpapi", consumes = MediaType.APPLICATION_JSON_VALUE)
HttpV2ResponseDTO uploadRequest(@RequestBody @Valid HttpV2RequestDTO request);

// TODO!!: 안될 것 같은데
// TODO: 응답값 제대로 작동되는지 추후 확인 필요
@PostMapping(value = "/identify", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
void identifyUserProperty(@RequestBody String request);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public interface MemberBreadTypeRepository extends JpaRepository<MemberBreadType

// List<MemberBreadType> findAllByMemberId(Long memberId);

// TODO: 쿼리 확인 필요(+transactional 필요없는지)
@Modifying
@Query("delete from MemberBreadType mbt where mbt.member = :member")
void deleteAllByMember(Member member);
Expand Down

0 comments on commit d188e2c

Please sign in to comment.