mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2025-12-05 23:56:23 +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
61
deployment/cicd/Jenkinsfile
vendored
61
deployment/cicd/Jenkinsfile
vendored
@ -9,19 +9,56 @@ def getImageTag() {
|
||||
podTemplate(
|
||||
label: "${PIPELINE_ID}",
|
||||
serviceAccount: 'jenkins',
|
||||
slaveConnectTimeout: 300,
|
||||
idleMinutes: 30,
|
||||
activeDeadlineSeconds: 3600,
|
||||
containers: [
|
||||
containerTemplate(name: 'podman', image: "mgoltzsche/podman", ttyEnabled: true, command: 'cat', privileged: true),
|
||||
containerTemplate(name: 'gradle',
|
||||
image: 'gradle:jdk21',
|
||||
ttyEnabled: true,
|
||||
command: 'cat',
|
||||
envVars: [
|
||||
envVar(key: 'DOCKER_HOST', value: 'unix:///run/podman/podman.sock'),
|
||||
envVar(key: 'TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE', value: '/run/podman/podman.sock'),
|
||||
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: 'podman',
|
||||
image: "mgoltzsche/podman",
|
||||
ttyEnabled: true,
|
||||
command: 'cat',
|
||||
privileged: true,
|
||||
resourceRequestCpu: '1000m',
|
||||
resourceRequestMemory: '2Gi',
|
||||
resourceLimitCpu: '2000m',
|
||||
resourceLimitMemory: '4Gi'
|
||||
),
|
||||
containerTemplate(
|
||||
name: 'gradle',
|
||||
image: 'gradle:jdk21',
|
||||
ttyEnabled: true,
|
||||
command: 'cat',
|
||||
resourceRequestCpu: '500m',
|
||||
resourceRequestMemory: '1Gi',
|
||||
resourceLimitCpu: '1000m',
|
||||
resourceLimitMemory: '2Gi',
|
||||
envVars: [
|
||||
envVar(key: 'DOCKER_HOST', value: 'unix:///run/podman/podman.sock'),
|
||||
envVar(key: 'TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE', value: '/run/podman/podman.sock'),
|
||||
envVar(key: 'TESTCONTAINERS_RYUK_DISABLED', value: 'true')
|
||||
]
|
||||
),
|
||||
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: [
|
||||
emptyDirVolume(mountPath: '/home/gradle/.gradle', memory: false),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user