Compare commits
12 Commits
feature/fa
...
feature/gi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
745c5a7461 | ||
|
|
a586ba28bd | ||
|
|
7b47a02d9a | ||
|
|
7fb2bfdfa4 | ||
|
|
98a8159d9f | ||
| 632eaa721e | |||
| b6ab357703 | |||
| 8fca06fcbc | |||
| 53887b77ed | |||
| fc1420a0ea | |||
| 80b13f2893 | |||
| 75b5328f27 |
@@ -8,49 +8,24 @@ jobs:
|
|||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
container:
|
|
||||||
image: ci-maven-node:1.0
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- 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: Maven Build WAR
|
- name: Maven Build WAR
|
||||||
run: mvn -B clean package -DskipTests
|
run: mvn -B clean package -DskipTests
|
||||||
|
|
||||||
# ------------------------------
|
- name: Login Harbor
|
||||||
# 🔻 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)
|
|
||||||
run: |
|
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
|
- name: Build Docker image
|
||||||
run: echo "Main branch build completed (Harbor push disabled)."
|
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:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize] # PR 생성 + 커밋 push 때만 실행
|
types: [opened, synchronize]
|
||||||
branches: ["master"]
|
branches: ["master"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-test:
|
build-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
container:
|
|
||||||
image: ci-maven-node:1.0
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up JDK 8
|
- name: Maven Build (skip tests)
|
||||||
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)
|
|
||||||
run: mvn -B clean package -DskipTests
|
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 \
|
https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v${OTEL_VERSION}/opentelemetry-javaagent.jar \
|
||||||
-o /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
|
FROM tomcat:9.0-jdk8-temurin
|
||||||
|
|
||||||
ENV TZ=Asia/Seoul \
|
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_ENDPOINT=http://192.168.100.203:4317 \
|
||||||
OTEL_EXPORTER_OTLP_PROTOCOL=grpc \
|
OTEL_EXPORTER_OTLP_PROTOCOL=grpc \
|
||||||
OTEL_RESOURCE_ATTRIBUTES="deployment.environment=prod" \
|
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
|
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
|
||||||
|
|
||||||
# OTEL 에이전트 복사
|
# OTEL 에이전트 복사
|
||||||
COPY --from=otel /opentelemetry-javaagent.jar /opt/opentelemetry-javaagent.jar
|
COPY --from=otel /opentelemetry-javaagent.jar /opt/opentelemetry-javaagent.jar
|
||||||
# OTEL 1000:1000 으로 구동 가능 하도록 처리
|
|
||||||
RUN chown 1000:1000 /opt/opentelemetry-javaagent.jar
|
RUN chown 1000:1000 /opt/opentelemetry-javaagent.jar
|
||||||
|
|
||||||
# 🔽 기본 웹앱 정리
|
# 기본 웹앱 정리
|
||||||
RUN rm -rf /usr/local/tomcat/webapps/*
|
RUN rm -rf /usr/local/tomcat/webapps/*
|
||||||
|
|
||||||
# Maven 빌드된 WAR 복사
|
# Maven 빌드된 WAR 복사
|
||||||
# Maven 빌드 결과 파일명에 맞게 수정
|
|
||||||
COPY target/sayit-helpdesk.war /usr/local/tomcat/webapps/ROOT.war
|
COPY target/sayit-helpdesk.war /usr/local/tomcat/webapps/ROOT.war
|
||||||
# TOMCAT 구동전 톰캣은 1000:1000 으로 구동 할 수 있도록 조정
|
|
||||||
RUN chown -R 1000:1000 /usr/local/tomcat/
|
RUN chown -R 1000:1000 /usr/local/tomcat/
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|||||||
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@@ -1,9 +1,10 @@
|
|||||||
// Jenkinsfile — Kaniko build + K8s deploy (latest only)
|
// Jenkinsfile — Kaniko build + K8s deploy (빌드번호 태그 사용)
|
||||||
def L = 'kaniko-and-deploy'
|
def L = 'kaniko-and-deploy'
|
||||||
def REG = 'harbor.sayinfo.co.kr'
|
def REG = 'harbor.sayinfo.co.kr'
|
||||||
def IMAGE = 'sayit-helpdesk/helpdesk-service' // Harbor 프로젝트/레포 이름에 맞게 유지 또는 수정
|
def IMAGE = 'sayit-helpdesk/helpdesk-service' // Harbor 프로젝트/레포 이름
|
||||||
def APP_NS = 'sayit-helpdesk' // 실제 K8s 네임스페이스와 일치해야 함
|
def APP_NS = 'sayit-helpdesk' // 실제 K8s 네임스페이스
|
||||||
def DEPLOY = 'sayit-helpdesk-service' // 실제 Deployment 이름과 일치해야 함
|
def DEPLOY = 'sayit-helpdesk-service' // 실제 Deployment 이름
|
||||||
|
def IMAGE_TAG = "${env.BUILD_NUMBER}"
|
||||||
|
|
||||||
podTemplate(
|
podTemplate(
|
||||||
label: L,
|
label: L,
|
||||||
@@ -104,7 +105,7 @@ spec:
|
|||||||
/kaniko/executor \\
|
/kaniko/executor \\
|
||||||
--context=. \\
|
--context=. \\
|
||||||
--dockerfile=Dockerfile \\
|
--dockerfile=Dockerfile \\
|
||||||
--destination=${REG}/${IMAGE}:latest \\
|
--destination=${REG}/${IMAGE}:${IMAGE_TAG} \\
|
||||||
--snapshot-mode=redo \\
|
--snapshot-mode=redo \\
|
||||||
--skip-tls-verify \\
|
--skip-tls-verify \\
|
||||||
--cache=true \\
|
--cache=true \\
|
||||||
@@ -117,8 +118,7 @@ spec:
|
|||||||
container('kubectl') {
|
container('kubectl') {
|
||||||
sh """
|
sh """
|
||||||
set -eux
|
set -eux
|
||||||
kubectl -n ${APP_NS} set image deploy/${DEPLOY} ${DEPLOY}=${REG}/${IMAGE}:latest
|
kubectl -n ${APP_NS} set image deploy/${DEPLOY} ${DEPLOY}=${REG}/${IMAGE}:${IMAGE_TAG}
|
||||||
kubectl -n ${APP_NS} rollout restart deploy/${DEPLOY}
|
|
||||||
kubectl -n ${APP_NS} rollout status deploy/${DEPLOY} --timeout=300s
|
kubectl -n ${APP_NS} rollout status deploy/${DEPLOY} --timeout=300s
|
||||||
|
|
||||||
kubectl -n ${APP_NS} get deploy ${DEPLOY} -o wide
|
kubectl -n ${APP_NS} get deploy ${DEPLOY} -o wide
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<script src="js/common/login.js"></script>
|
<script src="js/common/login.js"></script>
|
||||||
<base target="_self" />
|
<base target="_self" />
|
||||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
<title><%=MainGlobals.SITE_TITLE%></title>
|
||||||
|
<link rel="icon" type="image/x-icon" href="${pageContext.request.contextPath}/Favicon.ico?v=20251209" />
|
||||||
<style>
|
<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_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;}
|
.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="" />
|
<meta name="keywords" content="" />
|
||||||
<base target="_self" />
|
<base target="_self" />
|
||||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
<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">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/engine.js"></script>
|
||||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.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="" />
|
<meta name="keywords" content="" />
|
||||||
<base target="_self" />
|
<base target="_self" />
|
||||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
<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">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/engine.js"></script>
|
||||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.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="" />
|
<meta name="keywords" content="" />
|
||||||
<base target="_self" />
|
<base target="_self" />
|
||||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
<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">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/engine.js"></script>
|
||||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.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="" />
|
<meta name="keywords" content="" />
|
||||||
<base target="_self" />
|
<base target="_self" />
|
||||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
<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">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/engine.js"></script>
|
||||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
|
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
<meta name="keywords" content="noframe" />
|
<meta name="keywords" content="noframe" />
|
||||||
<base target="_self" />
|
<base target="_self" />
|
||||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
<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">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/engine.js"></script>
|
||||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.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="" />
|
<meta name="keywords" content="" />
|
||||||
<base target="_self" />
|
<base target="_self" />
|
||||||
<title><%=MainGlobals.SITE_TITLE%></title>
|
<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">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/engine.js"></script>
|
||||||
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
|
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user