Compare commits
17 Commits
c289eb242d
...
feature/gi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
745c5a7461 | ||
|
|
a586ba28bd | ||
|
|
7b47a02d9a | ||
|
|
7fb2bfdfa4 | ||
|
|
98a8159d9f | ||
| 632eaa721e | |||
| b6ab357703 | |||
| 8fca06fcbc | |||
| 53887b77ed | |||
|
|
2808bbc29d | ||
| fc1420a0ea | |||
| 80b13f2893 | |||
|
|
ea2ecf2539 | ||
| 75b5328f27 | |||
| 320e64f929 | |||
| 58d246a993 | |||
| 9eade14238 |
@@ -8,49 +8,24 @@ jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: ci-maven-node:1.0
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "8"
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Maven Build WAR
|
||||
run: mvn -B clean package -DskipTests
|
||||
|
||||
# ------------------------------
|
||||
# 🔻 Harbor 관련 기능 임시 비활성화
|
||||
# ------------------------------
|
||||
|
||||
# - name: Docker login to Harbor
|
||||
# run: |
|
||||
# echo "${{ secrets.HARBOR_PASSWORD }}" | docker login harbor.sayinfo.co.kr -u ${{ secrets.HARBOR_USERNAME }} --password-stdin
|
||||
|
||||
# - name: Build Docker image
|
||||
# run: |
|
||||
# docker build -t sayit-helpdesk:latest .
|
||||
|
||||
# - name: Tag image for Harbor
|
||||
# run: |
|
||||
# docker tag sayit-helpdesk:latest harbor.sayinfo.co.kr/helpdesk/helpdesk-service:latest
|
||||
|
||||
# - name: Push image to Harbor
|
||||
# run: |
|
||||
# docker push harbor.sayinfo.co.kr/helpdesk/helpdesk-service:latest
|
||||
|
||||
# ------------------------------
|
||||
# 끝 (Harbor 비활성화)
|
||||
# ------------------------------
|
||||
|
||||
- name: Build Docker image (local only, no push)
|
||||
- name: Login Harbor
|
||||
run: |
|
||||
docker build -t sayit-helpdesk:local-test .
|
||||
printf "%s" "$HARBOR_PASSWORD" | docker login harbor.sayinfo.co.kr -u "$HARBOR_USERNAME" --password-stdin
|
||||
env:
|
||||
HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }}
|
||||
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
|
||||
|
||||
- name: Done
|
||||
run: echo "Main branch build completed (Harbor push disabled)."
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker build -t sayit-helpdesk:latest .
|
||||
|
||||
- name: Push to Harbor
|
||||
run: |
|
||||
docker tag sayit-helpdesk:latest harbor.sayinfo.co.kr/sayit-helpdesk-gitea_action_runner_test/helpdesk-service:latest
|
||||
docker push harbor.sayinfo.co.kr/sayit-helpdesk-gitea_action_runner_test/helpdesk-service:latest
|
||||
|
||||
@@ -2,33 +2,15 @@ name: PR-CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize] # PR 생성 + 커밋 push 때만 실행
|
||||
types: [opened, synchronize]
|
||||
branches: ["master"]
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: ci-maven-node:1.0
|
||||
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "8"
|
||||
|
||||
- name: Cache Maven repo
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.m2
|
||||
key: m2-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
m2-${{ runner.os }}-
|
||||
|
||||
- name: Maven Build (compile + dependency check)
|
||||
- name: Maven Build (skip tests)
|
||||
run: mvn -B clean package -DskipTests
|
||||
|
||||
19
Dockerfile
19
Dockerfile
@@ -7,7 +7,7 @@ RUN apk add --no-cache curl && \
|
||||
https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v${OTEL_VERSION}/opentelemetry-javaagent.jar \
|
||||
-o /opentelemetry-javaagent.jar
|
||||
|
||||
# 2단계: Tomcat 이미지 (Java 8 기준, Java 17 쓸 거면 jdk17-temurin 그대로 사용)
|
||||
# 2단계: Tomcat 이미지 (Java 8 기준)
|
||||
FROM tomcat:9.0-jdk8-temurin
|
||||
|
||||
ENV TZ=Asia/Seoul \
|
||||
@@ -15,23 +15,30 @@ ENV TZ=Asia/Seoul \
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT=http://192.168.100.203:4317 \
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL=grpc \
|
||||
OTEL_RESOURCE_ATTRIBUTES="deployment.environment=prod" \
|
||||
JAVA_TOOL_OPTIONS="-javaagent:/opt/opentelemetry-javaagent.jar"
|
||||
JAVA_TOOL_OPTIONS="\
|
||||
-Xms1g \
|
||||
-Xmx1g \
|
||||
-XX:+UseG1GC \
|
||||
-XX:MaxGCPauseMillis=200 \
|
||||
-XX:+UnlockExperimentalVMOptions \
|
||||
-XX:+UseStringDeduplication \
|
||||
-XX:+HeapDumpOnOutOfMemoryError \
|
||||
-XX:HeapDumpPath=/tmp \
|
||||
-XX:+DisableExplicitGC \
|
||||
-javaagent:/opt/opentelemetry-javaagent.jar"
|
||||
|
||||
# 타임존 설정
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
|
||||
|
||||
# OTEL 에이전트 복사
|
||||
COPY --from=otel /opentelemetry-javaagent.jar /opt/opentelemetry-javaagent.jar
|
||||
# OTEL 1000:1000 으로 구동 가능 하도록 처리
|
||||
RUN chown 1000:1000 /opt/opentelemetry-javaagent.jar
|
||||
|
||||
# 🔽 기본 웹앱 정리
|
||||
# 기본 웹앱 정리
|
||||
RUN rm -rf /usr/local/tomcat/webapps/*
|
||||
|
||||
# Maven 빌드된 WAR 복사
|
||||
# Maven 빌드 결과 파일명에 맞게 수정
|
||||
COPY target/sayit-helpdesk.war /usr/local/tomcat/webapps/ROOT.war
|
||||
# TOMCAT 구동전 톰캣은 1000:1000 으로 구동 할 수 있도록 조정
|
||||
RUN chown -R 1000:1000 /usr/local/tomcat/
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
20
Jenkinsfile
vendored
20
Jenkinsfile
vendored
@@ -1,9 +1,10 @@
|
||||
// Jenkinsfile — Kaniko build + K8s deploy (latest only)
|
||||
def L = 'kaniko-and-deploy'
|
||||
def REG = 'harbor.sayinfo.co.kr'
|
||||
def IMAGE = 'sayit-helpdesk/helpdesk-service' // Harbor 프로젝트/레포 이름에 맞게 유지 또는 수정
|
||||
def APP_NS = 'sayit-helpdesk' // 실제 K8s 네임스페이스와 일치해야 함
|
||||
def DEPLOY = 'sayit-helpdesk-service' // 실제 Deployment 이름과 일치해야 함
|
||||
// Jenkinsfile — Kaniko build + K8s deploy (빌드번호 태그 사용)
|
||||
def L = 'kaniko-and-deploy'
|
||||
def REG = 'harbor.sayinfo.co.kr'
|
||||
def IMAGE = 'sayit-helpdesk/helpdesk-service' // Harbor 프로젝트/레포 이름
|
||||
def APP_NS = 'sayit-helpdesk' // 실제 K8s 네임스페이스
|
||||
def DEPLOY = 'sayit-helpdesk-service' // 실제 Deployment 이름
|
||||
def IMAGE_TAG = "${env.BUILD_NUMBER}"
|
||||
|
||||
podTemplate(
|
||||
label: L,
|
||||
@@ -104,7 +105,7 @@ spec:
|
||||
/kaniko/executor \\
|
||||
--context=. \\
|
||||
--dockerfile=Dockerfile \\
|
||||
--destination=${REG}/${IMAGE}:latest \\
|
||||
--destination=${REG}/${IMAGE}:${IMAGE_TAG} \\
|
||||
--snapshot-mode=redo \\
|
||||
--skip-tls-verify \\
|
||||
--cache=true \\
|
||||
@@ -113,12 +114,11 @@ spec:
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy to Kubernetes') {
|
||||
stage('Deploy to Kubernetes') {
|
||||
container('kubectl') {
|
||||
sh """
|
||||
set -eux
|
||||
kubectl -n ${APP_NS} set image deploy/${DEPLOY} ${DEPLOY}=${REG}/${IMAGE}:latest
|
||||
kubectl -n ${APP_NS} rollout restart deploy/${DEPLOY}
|
||||
kubectl -n ${APP_NS} set image deploy/${DEPLOY} ${DEPLOY}=${REG}/${IMAGE}:${IMAGE_TAG}
|
||||
kubectl -n ${APP_NS} rollout status deploy/${DEPLOY} --timeout=300s
|
||||
|
||||
kubectl -n ${APP_NS} get deploy ${DEPLOY} -o wide
|
||||
|
||||
@@ -45,7 +45,9 @@ public class AuthenticInterceptor extends HandlerInterceptorAdapter {
|
||||
uri.equals("/") ||
|
||||
uri.equals("/actionLoginSys.do") ||
|
||||
uri.equals("/js/") ||
|
||||
uri.equals("/images/")
|
||||
uri.equals("/images/") ||
|
||||
uri.equals("/health.do")
|
||||
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class MainController {
|
||||
return startPage;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/health", method = RequestMethod.GET)
|
||||
@RequestMapping(value = "/health.do", method = RequestMethod.GET)
|
||||
public void health(HttpServletResponse response) throws IOException {
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.setContentType("text/plain;charset=UTF-8");
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<security:http pattern="/js/**" security="none"/>
|
||||
<security:http pattern="/resource/**" security="none"/>
|
||||
<security:http pattern="\A/WEB-INF/jsp/.*\Z" request-matcher="regex" security="none"/>
|
||||
<security:http pattern="/health.do" security="none"/>
|
||||
|
||||
<egov-security:config id="securityConfig"
|
||||
loginUrl="/login.do"
|
||||
|
||||
BIN
src/main/webapp/Favicon.ico
Normal file
BIN
src/main/webapp/Favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -17,6 +17,7 @@
|
||||
<script src="js/common/login.js"></script>
|
||||
<base target="_self" />
|
||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
||||
<link rel="icon" type="image/x-icon" href="${pageContext.request.contextPath}/Favicon.ico?v=20251209" />
|
||||
<style>
|
||||
.login_wrap_body{ background:url(${pageContext.request.contextPath}/images/admin/login_bg.gif) repeat left top; font-family:"맑은 고딕",Malgun Gothic,AppleGothic,sans-serif,"돋움", Dotum; }
|
||||
.login_wrap{display:block; height:100%; left:0; position:fixed; top:0; width:100%; z-index:10000;}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<meta name="keywords" content="" />
|
||||
<base target="_self" />
|
||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
||||
<link rel="icon" type="image/x-icon" href="${pageContext.request.contextPath}/Favicon.ico?v=20251209" />
|
||||
<script type="text/javascript">var G_CONTEXT_PATH = '${pageContext.request.contextPath}';</script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/engine.js"></script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
|
||||
|
||||
@@ -22,6 +22,7 @@ if(UserHelper.isAuthenticated()) {
|
||||
<meta name="keywords" content="" />
|
||||
<base target="_self" />
|
||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
||||
<link rel="icon" type="image/x-icon" href="${pageContext.request.contextPath}/Favicon.ico?v=20251209" />
|
||||
<script type="text/javascript">var G_CONTEXT_PATH = '${pageContext.request.contextPath}';</script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/engine.js"></script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
|
||||
|
||||
@@ -23,6 +23,7 @@ if(UserHelper.isAuthenticated()) {
|
||||
<meta name="keywords" content="" />
|
||||
<base target="_self" />
|
||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
||||
<link rel="icon" type="image/x-icon" href="${pageContext.request.contextPath}/Favicon.ico?v=20251209" />
|
||||
<script type="text/javascript">var G_CONTEXT_PATH = '${pageContext.request.contextPath}';</script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/engine.js"></script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
|
||||
|
||||
@@ -22,6 +22,7 @@ if(UserHelper.isAuthenticated()) {
|
||||
<meta name="keywords" content="" />
|
||||
<base target="_self" />
|
||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
||||
<link rel="icon" type="image/x-icon" href="${pageContext.request.contextPath}/Favicon.ico?v=20251209" />
|
||||
<script type="text/javascript">var G_CONTEXT_PATH = '${pageContext.request.contextPath}';</script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/engine.js"></script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<meta name="keywords" content="noframe" />
|
||||
<base target="_self" />
|
||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
||||
<link rel="icon" type="image/x-icon" href="${pageContext.request.contextPath}/Favicon.ico?v=20251209" />
|
||||
<script type="text/javascript">var G_CONTEXT_PATH = "${pageContext.request.contextPath}";</script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/engine.js"></script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
|
||||
|
||||
@@ -22,6 +22,7 @@ if(UserHelper.isAuthenticated()) {
|
||||
<meta name="keywords" content="" />
|
||||
<base target="_self" />
|
||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
||||
<link rel="icon" type="image/x-icon" href="${pageContext.request.contextPath}/Favicon.ico?v=20251209" />
|
||||
<script type="text/javascript">var G_CONTEXT_PATH = '${pageContext.request.contextPath}';</script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/engine.js"></script>
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user