fix: add checkout step and sync code to host volume in deployment pipeline
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 8s
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 8s
This commit is contained in:
@@ -11,6 +11,14 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Sync Code to Host Volume
|
||||||
|
run: |
|
||||||
|
echo "Copying latest code to /app (Host Volume)..."
|
||||||
|
cp -a . /app/
|
||||||
|
|
||||||
- name: Deploy Task on Host
|
- name: Deploy Task on Host
|
||||||
run: |
|
run: |
|
||||||
echo "Starting Standard CI/CD Deploy pipeline..."
|
echo "Starting Standard CI/CD Deploy pipeline..."
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package io.shinhanlife.dap.dapmt.converter;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.dapmt.dto.SearchHrReq;
|
||||||
|
import io.shinhanlife.dap.dapmt.dto.SearchHrRes;
|
||||||
|
import io.shinhanlife.dap.dapmt.legacy.SearchHrLegacyReq;
|
||||||
|
import io.shinhanlife.dap.dapmt.legacy.SearchHrLegacyRes;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.Mapping;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package io.shinhanlife.dap.dapmt.converter
|
||||||
|
* @className SearchHrLegacyConverter
|
||||||
|
* @description AX HUB 시스템 처리 클래스
|
||||||
|
* @author root
|
||||||
|
* @create 2026.07.23
|
||||||
|
* <pre>
|
||||||
|
* ---------- 개정이력 ----------
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ---------- -------- ---------------------------
|
||||||
|
* 2026.07.23 root 최초생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Mapper(componentModel = "spring")
|
||||||
|
public interface SearchHrLegacyConverter {
|
||||||
|
|
||||||
|
@Mapping(source = "phoneNumber", target = "phone")
|
||||||
|
@Mapping(source = "message", target = "content")
|
||||||
|
SearchHrLegacyReq toLegacyReq(SearchHrReq req);
|
||||||
|
|
||||||
|
@Mapping(source = "phone", target = "phoneNumber")
|
||||||
|
@Mapping(source = "content", target = "message")
|
||||||
|
SearchHrReq toReq(SearchHrLegacyReq legacyReq);
|
||||||
|
|
||||||
|
// SearchHrRes toRes(SearchHrLegacyRes legacyRes);
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package io.shinhanlife.dap.dapmt.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.shinhanlife.dap.dapmt.annotation.McpParameter;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package io.shinhanlife.dap.dapmt.dto
|
||||||
|
* @className SearchHrReq
|
||||||
|
* @description AX HUB 시스템 처리 클래스
|
||||||
|
* @author root
|
||||||
|
* @create 2026.07.23
|
||||||
|
* <pre>
|
||||||
|
* ---------- 개정이력 ----------
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ---------- -------- ---------------------------
|
||||||
|
* 2026.07.23 root 최초생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
public class SearchHrReq {
|
||||||
|
@McpParameter(description = "수신자 전화번호", required = true)
|
||||||
|
private String phoneNumber;
|
||||||
|
|
||||||
|
@McpParameter(description = "전송할 메시지 내용", required = true)
|
||||||
|
private String message;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package io.shinhanlife.dap.dapmt.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package io.shinhanlife.dap.dapmt.dto
|
||||||
|
* @className SearchHrRes
|
||||||
|
* @description AX HUB 시스템 처리 클래스
|
||||||
|
* @author root
|
||||||
|
* @create 2026.07.23
|
||||||
|
* <pre>
|
||||||
|
* ---------- 개정이력 ----------
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ---------- -------- ---------------------------
|
||||||
|
* 2026.07.23 root 최초생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
public class SearchHrRes {
|
||||||
|
private String status;
|
||||||
|
private String message;
|
||||||
|
// TODO: Add response fields here
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package io.shinhanlife.dap.dapmt.legacy;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package io.shinhanlife.dap.dapmt.legacy
|
||||||
|
* @className SearchHrLegacyReq
|
||||||
|
* @description AX HUB 시스템 처리 클래스
|
||||||
|
* @author root
|
||||||
|
* @create 2026.07.23
|
||||||
|
* <pre>
|
||||||
|
* ---------- 개정이력 ----------
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ---------- -------- ---------------------------
|
||||||
|
* 2026.07.23 root 최초생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SearchHrLegacyReq {
|
||||||
|
/**
|
||||||
|
* EAI 시스템이 요구하는 수신자 번호 파라미터명
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EAI 시스템이 요구하는 메시지 내용 파라미터명
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package io.shinhanlife.dap.dapmt.legacy;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package io.shinhanlife.dap.dapmt.legacy
|
||||||
|
* @className SearchHrLegacyRes
|
||||||
|
* @description AX HUB 시스템 처리 클래스
|
||||||
|
* @author root
|
||||||
|
* @create 2026.07.23
|
||||||
|
* <pre>
|
||||||
|
* ---------- 개정이력 ----------
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ---------- -------- ---------------------------
|
||||||
|
* 2026.07.23 root 최초생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SearchHrLegacyRes {
|
||||||
|
// TODO: Add legacy response fields here
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package io.shinhanlife.dap.dapmt.service;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.dapmt.dto.SearchHrReq;
|
||||||
|
|
||||||
|
public interface SearchHrService {
|
||||||
|
Object execute(SearchHrReq req);
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package io.shinhanlife.dap.dapmt.service.impl;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.dapmt.annotation.McpFunction;
|
||||||
|
import io.shinhanlife.dap.dapmt.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.dapmt.dto.SearchHrReq;
|
||||||
|
import io.shinhanlife.dap.dapmt.dto.SearchHrRes;
|
||||||
|
import io.shinhanlife.dap.dapmt.service.SearchHrService;
|
||||||
|
import io.shinhanlife.dap.common.integration.mci.component.AxhubMciComponent;
|
||||||
|
import io.shinhanlife.glow.communication.dto.Transfer;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import java.util.Map;
|
||||||
|
import io.shinhanlife.dap.dapmt.converter.SearchHrLegacyConverter;
|
||||||
|
import io.shinhanlife.dap.dapmt.legacy.SearchHrLegacyReq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package io.shinhanlife.dap.dapmt.service.impl
|
||||||
|
* @className SearchHrServiceImpl
|
||||||
|
* @description AX HUB 시스템 처리 클래스
|
||||||
|
* @author root
|
||||||
|
* @create 2026.07.23
|
||||||
|
* <pre>
|
||||||
|
* ---------- 개정이력 ----------
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ---------- -------- ---------------------------
|
||||||
|
* 2026.07.23 root 최초생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@McpTool(
|
||||||
|
routingType = "MCI",
|
||||||
|
categoryKey = "hr"
|
||||||
|
)
|
||||||
|
public class SearchHrServiceImpl implements SearchHrService {
|
||||||
|
|
||||||
|
private final AxhubMciComponent mci;
|
||||||
|
private final SearchHrLegacyConverter converter;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@McpFunction(
|
||||||
|
displayName = "SearchHr 툴",
|
||||||
|
name = "searchHr",
|
||||||
|
description = "hr 조회 합니다 ",
|
||||||
|
prompt = "hr 조회 합니다 해줘.",
|
||||||
|
mappingId = "SHEARCH_01",
|
||||||
|
register = false,
|
||||||
|
requiresApproval = false,
|
||||||
|
openWorldHint = true
|
||||||
|
)
|
||||||
|
public Object execute(SearchHrReq req) {
|
||||||
|
log.info("[MCI Tool] {} 요청 수신.", "SearchHr");
|
||||||
|
try {
|
||||||
|
// MapStruct를 이용한 자동 매핑 (AI DTO -> MCI DTO)
|
||||||
|
SearchHrLegacyReq legacyReq = converter.toLegacyReq(req);
|
||||||
|
|
||||||
|
Transfer<Object> resTransfer = mci.callTo(
|
||||||
|
"SHEARCH_01",
|
||||||
|
null,
|
||||||
|
legacyReq,
|
||||||
|
Object.class
|
||||||
|
);
|
||||||
|
return resTransfer.getBody() != null ? resTransfer.getBody() : Map.of("status", "SUCCESS");
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("[MCI Tool] 연동 중 오류 발생: {}", e.getMessage(), e);
|
||||||
|
return Map.of("status", "ERROR", "message", e.getMessage() != null ? e.getMessage() : "Unknown error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user