-
Notifications
You must be signed in to change notification settings - Fork 6
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 #5 from pbcccBeatBoard/main
test docker and edit exception
- Loading branch information
Showing
52 changed files
with
6,562 additions
and
5,287 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,3 +1,3 @@ | ||
FROM openjdk:17-slim | ||
FROM openjdk:17-slim AS prod | ||
COPY ./build/libs/am.jar am.jar | ||
ENTRYPOINT ["java", "-jar","am.jar"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# temp docker-compose | ||
networks: | ||
internal_network: | ||
internal: true | ||
external_network: | ||
driver: bridge | ||
|
||
# jenkins - for workflow manager | ||
jenkins: | ||
image: jenkins/jenkins:jdk17 | ||
container_name: jenkins | ||
platform: linux/amd64 | ||
networks: | ||
- internal_network | ||
- external_network | ||
ports: | ||
- target: 8080 | ||
published: 9800 | ||
protocol: tcp | ||
volumes: | ||
- ~/:/var/jenkins_home # -v $HOME/mcmp/oss/jenkins:/var/jenkins_home | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /usr/bin/docker:/usr/bin/docker # -v $(which docker):/usr/bin/docker | ||
environment: | ||
- PROJECT=mcmp | ||
healthcheck: # for application-manager | ||
test: [ "CMD", "curl", "-f", "http://localhost:1024/catalog/software" ] | ||
interval: 1m | ||
timeout: 5s | ||
retries: 3 | ||
start_period: 10s | ||
|
||
# sonatype nexus - for application manager | ||
sonatype-nexus: | ||
image: sonatype/nexus3:latest | ||
container_name: nexus-repository | ||
platform: linux/amd64 | ||
networks: | ||
- internal_network | ||
- external_network | ||
ports: | ||
- target: 8081 | ||
published: 8081 | ||
protocol: tcp | ||
- target: 5000 # container-repository | ||
published: 5000 | ||
protocol: tcp | ||
volumes: | ||
- ~/:/nexus-data/blobs/ | ||
environment: | ||
- PROJECT=mcmp | ||
healthcheck: # for application-manager | ||
test: [ "CMD", "curl", "-f", "http://localhost:1024/catalog/software" ] | ||
interval: 1m | ||
timeout: 5s | ||
retries: 3 | ||
start_period: 10s | ||
|
||
# application-manager | ||
mc-application-manager: | ||
image: pbccc/devops:0.2.5 | ||
container_name: cb-mapui | ||
build: | ||
context: ./ | ||
dockerfile: Dockerfile | ||
networks: | ||
- external_network | ||
- external_network | ||
ports: | ||
- target: 18084 | ||
published: 18084 | ||
protocol: tcp | ||
volumes: | ||
- ~/:/nexus-data/blobs/ | ||
environment: | ||
- DDL_AUTO=create-drop | ||
- DB_USER=application | ||
- DB_PASS=application!23 | ||
- SQL_DATA_INIT=always | ||
healthcheck: # for cb-application-manager | ||
test: ["CMD", "nc", "-vz", "localhost", "1324"] | ||
interval: 1m | ||
timeout: 5s | ||
retries: 3 | ||
start_period: 10s |
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
Binary file not shown.
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
62 changes: 62 additions & 0 deletions
62
src/main/java/kr/co/mcmp/api/oss/component/CommonComponentController.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package kr.co.mcmp.api.oss.component; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import kr.co.mcmp.dto.oss.component.CommonComponent; | ||
import kr.co.mcmp.response.ResponseWrapper; | ||
import kr.co.mcmp.service.oss.component.CommonModuleComponentService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.*; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
import java.util.List; | ||
|
||
@Tag(name = "CommonComponentController - 컴포넌트 API 관련") | ||
@RequestMapping("/oss/v1/components") | ||
@RestController | ||
@RequiredArgsConstructor | ||
public class CommonComponentController { | ||
|
||
private final CommonModuleComponentService moduleComponentService; | ||
|
||
@Operation(summary = "컴포넌트 목록 조회") | ||
@GetMapping("/{module}/list/{name}") | ||
public ResponseEntity<ResponseWrapper<List<CommonComponent.ComponentDto>>> getComponentList( | ||
@Parameter(description = "모듈 타입", required = true, example = "nexus") @PathVariable("module") String module, | ||
@Parameter(description = "레포지토리 이름", required = true) @PathVariable("name") String name) { | ||
List<CommonComponent.ComponentDto> componentList = moduleComponentService.getComponentList(module, name); | ||
return ResponseEntity.ok(new ResponseWrapper<>(componentList)); | ||
} | ||
|
||
@Operation(summary = "컴포넌트 상세 조회") | ||
@GetMapping("/{module}/detail/{id}") | ||
public ResponseEntity<ResponseWrapper<CommonComponent.ComponentDto>> getComponentDetailByName( | ||
@Parameter(description = "모듈 타입", required = true, example = "nexus") @PathVariable("module") String module, | ||
@Parameter(description = "컴포넌트 식별자", required = true) @PathVariable("id") String id) { | ||
CommonComponent.ComponentDto componentDetailByName = moduleComponentService.getComponentDetailByName(module, id); | ||
return ResponseEntity.ok(new ResponseWrapper<>(componentDetailByName)); | ||
} | ||
|
||
@Operation(summary = "컴포넌트 삭제") | ||
@DeleteMapping("/{module}/delete/{id}") | ||
public ResponseEntity<ResponseWrapper<String>> deleteComponent( | ||
@Parameter(description = "모듈 타입", required = true, example = "nexus") @PathVariable("module") String module, | ||
@Parameter(description = "컴포넌트 식별자", required = true) @PathVariable("id") String id) { | ||
moduleComponentService.deleteComponent(module, id); | ||
return ResponseEntity.ok(new ResponseWrapper<>("Component delete completed")); | ||
} | ||
|
||
@Operation(summary = "컴포넌트 등록") | ||
@PostMapping("/{module}/create/{name}") | ||
public ResponseEntity<ResponseWrapper<String>> createComponent( | ||
@Parameter(description = "모듈 타입", required = true, example = "nexus") @PathVariable("module") String module, | ||
@Parameter(description = "레포지토리 이름", required = true) @PathVariable("name") String name, | ||
@RequestPart(value = "directory", required = false) String directory, | ||
@RequestPart(value = "asset", required = false) List<MultipartFile> files | ||
) { | ||
moduleComponentService.createComponent(module, name, directory, files); | ||
return ResponseEntity.ok(new ResponseWrapper<>("Component create completed")); | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
src/main/java/kr/co/mcmp/api/oss/repository/CommonRepositoryController.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package kr.co.mcmp.api.oss.repository; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import kr.co.mcmp.dto.oss.repository.CommonRepository; | ||
import kr.co.mcmp.response.ResponseWrapper; | ||
import kr.co.mcmp.service.oss.repository.CommonModuleRepositoryService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
import javax.validation.Valid; | ||
import java.util.List; | ||
|
||
@Tag(name = "CommonRepositoryController - 레포지토리 API 관련") | ||
@RequestMapping("/oss/v1/repositories") | ||
@RestController | ||
@RequiredArgsConstructor | ||
public class CommonRepositoryController { | ||
|
||
private final CommonModuleRepositoryService moduleRepositoryService; | ||
|
||
@Operation(summary = "레포지토리 목록 조회") | ||
@GetMapping("/{module}/list") | ||
public ResponseEntity<ResponseWrapper<List<CommonRepository.RepositoryDto>>> getRepositoryList( | ||
@Parameter(description = "모듈 타입", required = true, example = "nexus") @PathVariable("module") String module) { | ||
List<CommonRepository.RepositoryDto> repositoryList = moduleRepositoryService.getRepositoryList(module); | ||
return ResponseEntity.ok(new ResponseWrapper<>(repositoryList)); | ||
} | ||
|
||
@Operation(summary = "레포지토리 상세 조회") | ||
@GetMapping("/{module}/detail/{name}") | ||
public ResponseEntity<ResponseWrapper<CommonRepository.RepositoryDto>> getRepositoryDetailByName( | ||
@Parameter(description = "모듈 타입", required = true, example = "nexus") @PathVariable("module") String module, | ||
@Parameter(description = "레포지토리 이름", required = true) @PathVariable("name") String name) { | ||
CommonRepository.RepositoryDto repositoryDetailByName = moduleRepositoryService.getRepositoryDetailByName(module, name); | ||
return ResponseEntity.ok(new ResponseWrapper<>(repositoryDetailByName)); | ||
} | ||
|
||
@Operation(summary = "레포지토리 등록") | ||
@PostMapping("/{module}/create") | ||
public ResponseEntity<ResponseWrapper<String>> createRepository( | ||
@Parameter(description = "모듈 타입", required = true, example = "nexus") @PathVariable("module") String module, | ||
@RequestBody @Valid CommonRepository.RepositoryDto repositoryDto) { | ||
moduleRepositoryService.createRepository(module, repositoryDto); | ||
return ResponseEntity.ok(new ResponseWrapper<>("Repository create completed")); | ||
} | ||
|
||
@Operation(summary = "레포지토리 수정") | ||
@PutMapping("/{module}/update") | ||
public ResponseEntity<ResponseWrapper<String>> updateRepository( | ||
@Parameter(description = "모듈 타입", required = true, example = "nexus") @PathVariable("module") String module, | ||
@RequestBody @Valid CommonRepository.RepositoryDto repositoryDto) { | ||
moduleRepositoryService.updateRepository(module, repositoryDto); | ||
return ResponseEntity.ok(new ResponseWrapper<>("Repository update completed")); | ||
} | ||
|
||
@Operation(summary = "레포지토리 삭제") | ||
@DeleteMapping("/{module}/delete/{name}") | ||
public ResponseEntity<ResponseWrapper<String>> deleteRepository( | ||
@Parameter(description = "모듈 타입", required = true, example = "nexus") @PathVariable("module") String module, | ||
@Parameter(description = "레포지토리 이름", required = true) @PathVariable("name") String name) { | ||
moduleRepositoryService.deleteRepository(module, name); | ||
return ResponseEntity.ok(new ResponseWrapper<>("Repository delete completed")); | ||
} | ||
} |
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
Oops, something went wrong.