28 Commits

Author SHA1 Message Date
revlis44
2808bbc29d 파비콘 추가
Some checks failed
PR-CI / build-test (pull_request) Failing after 4m55s
2025-12-09 11:06:54 +09:00
revlis44
ea2ecf2539 favicon 변경
Some checks failed
PR-CI / build-test (pull_request) Failing after 6m30s
2025-12-09 10:29:00 +09:00
320e64f929 무중단 배포용 /health 200 응답 기능 Spring Security 예외 처리 추가 (login session 제외)
Some checks failed
Main-Build / build-and-push (push) Failing after 17s
2025-12-08 17:05:20 +09:00
58d246a993 무중단 배포용 /health 200 응답 기능 Spring Security 예외 처리 추가
Some checks failed
Main-Build / build-and-push (push) Failing after 22s
2025-12-08 16:24:34 +09:00
9eade14238 무중단 배포용 /health 200 응답 기능 Spring Security 예외 처리 추가
Some checks failed
Main-Build / build-and-push (push) Failing after 4s
2025-12-08 16:17:39 +09:00
c289eb242d Merge remote-tracking branch 'origin/master'
Some checks failed
Main-Build / build-and-push (push) Failing after 4s
2025-12-08 16:07:30 +09:00
cf5503f56f 무중단 배포용 /health 200 응답 기능 추가 2025-12-08 16:06:50 +09:00
158dc8f7a0 Merge pull request 'feature/add-favicon' (#10) from feature/add-favicon into master
Some checks failed
Main-Build / build-and-push (push) Failing after 17s
Reviewed-on: #10
Reviewed-by: saydev <gomdobi@sayinfo.co.kr>
2025-12-08 05:34:41 +00:00
revlis44
311aa989d3 favicon 추가
Some checks failed
PR-CI / build-test (pull_request) Failing after 6m30s
2025-12-08 14:21:29 +09:00
4b0471639c Merge pull request 'gitea-action-runner test' (#8) from feature/git-action3 into master
Some checks failed
Main-Build / build-and-push (push) Failing after 21s
Reviewed-on: #8
Reviewed-by: saydev <gomdobi@sayinfo.co.kr>
2025-12-08 01:41:14 +00:00
18b3dc3f8c 구동 권한 정리 2025-12-08 09:05:39 +09:00
7351a95f80 구동 권한 정리 2025-12-05 13:44:28 +09:00
4b865b2f1c 구동 권한 정리 2025-12-05 13:36:15 +09:00
d1c22a3b3f 구동 권한 정리 2025-12-05 13:29:12 +09:00
a7a7def41b K8S 롤아웃 컨트롤 활성화 2025-12-05 11:08:09 +09:00
cfaded0543 컨테이너 서비스 구동 계정 조정 2025-12-05 11:06:41 +09:00
f70e9552c5 컨테이너 서비스 구동 계정 조정 2025-12-05 11:03:40 +09:00
e33bf89f0f 컨테이너 서비스 구동 계정 조정 2025-12-05 11:00:37 +09:00
6d9763335c 컨테이너 서비스 구동 계정 조정 2025-12-05 10:57:51 +09:00
1ebb7522dc Harbor Secret 수정 2025-12-04 15:46:51 +09:00
676b9f76f3 젠킨스 연결 작업 2025-12-04 15:37:03 +09:00
f5d5e0d5db Merge pull request 'runner config' (#7) from feature/git-action3 into master
Reviewed-on: #7
Reviewed-by: saydev <gomdobi@sayinfo.co.kr>
2025-12-04 02:27:55 +00:00
02b798b01b Merge pull request 'push image to harbor' (#6) from feature/git-action3 into master
Reviewed-on: #6
Reviewed-by: saydev <gomdobi@sayinfo.co.kr>
2025-12-04 01:18:44 +00:00
2526cb0c53 Merge pull request 'feature/git-action3' (#5) from feature/git-action3 into master
Some checks failed
Master-Build / build-war (push) Has been cancelled
Reviewed-on: #5
Reviewed-by: saydev <gomdobi@sayinfo.co.kr>
2025-12-04 00:56:47 +00:00
2023107327 Merge pull request 'gitea-action-runner test' (#3) from feature/git-action into master
Some checks failed
Master-Build / build-war (push) Failing after 12m50s
Reviewed-on: #3
Reviewed-by: saydev <gomdobi@sayinfo.co.kr>
2025-12-03 07:58:55 +00:00
a2bf6949a2 Merge pull request 'git action' (#2) from feature/git-action into master
Some checks failed
Master-Build / build-war (push) Has been cancelled
Reviewed-on: #2
Reviewed-by: saydev <gomdobi@sayinfo.co.kr>
2025-12-03 07:12:09 +00:00
60eb072d7c Merge pull request 'chart.js 제거 (경량화버전으로 교체)' (#1) from feature/test into master
Reviewed-on: #1
Reviewed-by: saydev <gomdobi@sayinfo.co.kr>
2025-12-03 05:15:21 +00:00
revlis44
f1e1670db7 chart.js 제거 (경량화버전으로 교체) 2025-12-03 14:11:41 +09:00
9 changed files with 194 additions and 17 deletions

View File

@@ -10,8 +10,7 @@ jobs:
container: container:
image: ci-maven-node:1.0 image: ci-maven-node:1.0
options: >-
--add-host nexus.sayinfo.co.kr:10.1.20.50
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4

10
.mvn/settings.xml Normal file
View File

@@ -0,0 +1,10 @@
<settings>
<mirrors>
<mirror>
<id>sayinfo-nexus</id>
<name>Sayinfo Nexus</name>
<url>https://nexus.sayinfo.co.kr/repository/maven-public/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>

38
Dockerfile Normal file
View File

@@ -0,0 +1,38 @@
# 1단계: OTEL Java 에이전트 다운로드
FROM alpine:3.20 AS otel
ARG OTEL_VERSION=2.21.0
RUN apk add --no-cache curl && \
curl -fL \
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 그대로 사용)
FROM tomcat:9.0-jdk8-temurin
ENV TZ=Asia/Seoul \
OTEL_SERVICE_NAME=helpdesk_service \
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"
# 타임존 설정
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
CMD ["catalina.sh","run"]

132
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,132 @@
// 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 이름과 일치해야 함
podTemplate(
label: L,
yaml: """
apiVersion: v1
kind: Pod
spec:
serviceAccountName: default
securityContext:
fsGroup: 1001
fsGroupChangePolicy: OnRootMismatch
hostAliases:
- ip: "192.168.0.210"
hostnames:
- "harbor.sayinfo.co.kr"
- "nexus.sayinfo.co.kr"
containers:
- name: maven
image: maven:3.9.9-eclipse-temurin-8
command: ["/bin/sh","-lc"]
args: ["sleep 99d"]
tty: true
volumeMounts:
- name: workspace-volume
mountPath: /home/jenkins/agent
- name: maven-cache
mountPath: /root/.m2
- name: kaniko
image: gcr.io/kaniko-project/executor:debug
command: ["/busybox/sh","-c"]
args: ["sleep 99d"]
tty: true
volumeMounts:
- name: kaniko-auth
mountPath: /kaniko/.docker
- name: workspace-volume
mountPath: /home/jenkins/agent
- name: kubectl
image: bitnamilegacy/kubectl:latest
command: ["/bin/sh","-lc"]
args: ["sleep 99d"]
securityContext:
runAsUser: 0
runAsGroup: 0
tty: true
volumeMounts:
- name: workspace-volume
mountPath: /home/jenkins/agent
volumes:
- name: kaniko-auth
projected:
sources:
- secret:
name: regcred-sayit-helpdesk
items:
- key: .dockerconfigjson
path: config.json
- name: workspace-volume
emptyDir: {}
- name: maven-cache
persistentVolumeClaim:
claimName: maven-repo-pvc
"""
) {
node(L) {
timestamps {
stage('Checkout') {
checkout scm
}
stage('Maven Build') {
container('maven') {
sh '''
set -eux
cd "${WORKSPACE}"
mvn -B -q -e -T 1C -s .mvn/settings.xml clean package -DskipTests
'''
}
}
stage('Preflight (Kaniko)') {
container('kaniko') {
sh '''
set -eux
cd "${WORKSPACE}"
test -f /kaniko/.docker/config.json
nslookup harbor.sayinfo.co.kr || true
grep harbor /etc/hosts || true
'''
}
}
stage('Build & Push (Kaniko)') {
container('kaniko') {
sh """
set -eux
cd "\${WORKSPACE}"
/kaniko/executor \\
--context=. \\
--dockerfile=Dockerfile \\
--destination=${REG}/${IMAGE}:latest \\
--snapshot-mode=redo \\
--skip-tls-verify \\
--cache=true \\
--cache-repo=${REG}/sayit-helpdesk/build-cache
"""
}
}
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} rollout status deploy/${DEPLOY} --timeout=300s
kubectl -n ${APP_NS} get deploy ${DEPLOY} -o wide
kubectl -n ${APP_NS} get pods -l app=${DEPLOY} -o wide
kubectl -n ${APP_NS} get pod -l app=${DEPLOY} -o jsonpath='{.items[*].spec.containers[*].image}'; echo
"""
}
}
}
}
}

View File

@@ -45,7 +45,9 @@ public class AuthenticInterceptor extends HandlerInterceptorAdapter {
uri.equals("/") || uri.equals("/") ||
uri.equals("/actionLoginSys.do") || uri.equals("/actionLoginSys.do") ||
uri.equals("/js/") || uri.equals("/js/") ||
uri.equals("/images/") uri.equals("/images/") ||
uri.equals("/health.do")
) { ) {
return true; return true;
} }

View File

@@ -32,6 +32,8 @@ import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import java.io.IOException;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller @Controller
public class MainController { public class MainController {
@@ -88,5 +90,12 @@ public class MainController {
} }
return startPage; return startPage;
} }
@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");
response.getWriter().write("OK");
}
} }

View File

@@ -20,6 +20,7 @@
<security:http pattern="/js/**" security="none"/> <security:http pattern="/js/**" security="none"/>
<security:http pattern="/resource/**" security="none"/> <security:http pattern="/resource/**" security="none"/>
<security:http pattern="\A/WEB-INF/jsp/.*\Z" request-matcher="regex" 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" <egov-security:config id="securityConfig"
loginUrl="/login.do" loginUrl="/login.do"

BIN
src/main/webapp/Favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

File diff suppressed because one or more lines are too long