mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2026-01-22 02:26:22 +00:00
Jenkins 에이전트 연결 안정성 대폭 개선
- slaveConnectTimeout: 300초로 연결 타임아웃 설정 - activeDeadlineSeconds: 3600초로 Pod 최대 실행 시간 제한 - idleMinutes: 30분으로 에이전트 재사용 설정 - 컨테이너별 리소스 제한 추가 (podman: 1-2 cores, gradle: 0.5-1 core) - hudson.remoting.RequestAbortedException 연결 에러 해결 - Context7 기반 Jenkins Kubernetes 플러그인 모범사례 적용
This commit is contained in:
parent
fd4dc944f7
commit
64903b1b51
47
deployment/cicd/Jenkinsfile
vendored
47
deployment/cicd/Jenkinsfile
vendored
@ -9,19 +9,56 @@ def getImageTag() {
|
|||||||
podTemplate(
|
podTemplate(
|
||||||
label: "${PIPELINE_ID}",
|
label: "${PIPELINE_ID}",
|
||||||
serviceAccount: 'jenkins',
|
serviceAccount: 'jenkins',
|
||||||
|
slaveConnectTimeout: 300,
|
||||||
|
idleMinutes: 30,
|
||||||
|
activeDeadlineSeconds: 3600,
|
||||||
containers: [
|
containers: [
|
||||||
containerTemplate(name: 'podman', image: "mgoltzsche/podman", ttyEnabled: true, command: 'cat', privileged: true),
|
containerTemplate(
|
||||||
containerTemplate(name: 'gradle',
|
name: 'podman',
|
||||||
|
image: "mgoltzsche/podman",
|
||||||
|
ttyEnabled: true,
|
||||||
|
command: 'cat',
|
||||||
|
privileged: true,
|
||||||
|
resourceRequestCpu: '1000m',
|
||||||
|
resourceRequestMemory: '2Gi',
|
||||||
|
resourceLimitCpu: '2000m',
|
||||||
|
resourceLimitMemory: '4Gi'
|
||||||
|
),
|
||||||
|
containerTemplate(
|
||||||
|
name: 'gradle',
|
||||||
image: 'gradle:jdk21',
|
image: 'gradle:jdk21',
|
||||||
ttyEnabled: true,
|
ttyEnabled: true,
|
||||||
command: 'cat',
|
command: 'cat',
|
||||||
|
resourceRequestCpu: '500m',
|
||||||
|
resourceRequestMemory: '1Gi',
|
||||||
|
resourceLimitCpu: '1000m',
|
||||||
|
resourceLimitMemory: '2Gi',
|
||||||
envVars: [
|
envVars: [
|
||||||
envVar(key: 'DOCKER_HOST', value: 'unix:///run/podman/podman.sock'),
|
envVar(key: 'DOCKER_HOST', value: 'unix:///run/podman/podman.sock'),
|
||||||
envVar(key: 'TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE', value: '/run/podman/podman.sock'),
|
envVar(key: 'TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE', value: '/run/podman/podman.sock'),
|
||||||
envVar(key: 'TESTCONTAINERS_RYUK_DISABLED', value: 'true')
|
envVar(key: 'TESTCONTAINERS_RYUK_DISABLED', value: 'true')
|
||||||
]),
|
]
|
||||||
containerTemplate(name: 'azure-cli', image: 'hiondal/azure-kubectl:latest', command: 'cat', ttyEnabled: true),
|
),
|
||||||
containerTemplate(name: 'envsubst', image: "hiondal/envsubst", command: 'sleep', args: '1h')
|
containerTemplate(
|
||||||
|
name: 'azure-cli',
|
||||||
|
image: 'hiondal/azure-kubectl:latest',
|
||||||
|
command: 'cat',
|
||||||
|
ttyEnabled: true,
|
||||||
|
resourceRequestCpu: '200m',
|
||||||
|
resourceRequestMemory: '512Mi',
|
||||||
|
resourceLimitCpu: '500m',
|
||||||
|
resourceLimitMemory: '1Gi'
|
||||||
|
),
|
||||||
|
containerTemplate(
|
||||||
|
name: 'envsubst',
|
||||||
|
image: "hiondal/envsubst",
|
||||||
|
command: 'sleep',
|
||||||
|
args: '1h',
|
||||||
|
resourceRequestCpu: '100m',
|
||||||
|
resourceRequestMemory: '256Mi',
|
||||||
|
resourceLimitCpu: '200m',
|
||||||
|
resourceLimitMemory: '512Mi'
|
||||||
|
)
|
||||||
],
|
],
|
||||||
volumes: [
|
volumes: [
|
||||||
emptyDirVolume(mountPath: '/home/gradle/.gradle', memory: false),
|
emptyDirVolume(mountPath: '/home/gradle/.gradle', memory: false),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user