This commit is contained in:
hiondal 2025-02-18 01:06:41 +09:00
parent c310a6b993
commit c02f1477e9

View File

@ -10,7 +10,9 @@ podTemplate(
label: "${PIPELINE_ID}",
serviceAccount: 'jenkins',
containers: [
//containerTemplate(name: 'gradle', image: 'gradle:jdk17', ttyEnabled: true, command: 'cat'),
containerTemplate(name: "docker", image: "docker:latest", privileged: true, ttyEnabled: true, command: "cat"),
containerTemplate(name: 'gradle', image: 'gradle:jdk17', ttyEnabled: true, command: 'cat'),
/*
containerTemplate(
name: 'gradle',
image: 'gradle:jdk17',
@ -21,6 +23,7 @@ podTemplate(
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock')
]
),
*/
containerTemplate(name: 'podman', image: "mgoltzsche/podman", ttyEnabled: true, command: 'cat', privileged: true),
containerTemplate(name: 'azure-cli', image: 'hiondal/azure-kubectl:latest', command: 'cat', ttyEnabled: true),
containerTemplate(name: 'envsubst', image: "hiondal/envsubst", command: 'sleep', args: '1h')
@ -56,13 +59,10 @@ podTemplate(
stage('Build Applications') {
container('gradle') {
// Docker client 설치 및 권한 설정
// TestContainer를 위한 Docker 데몬 실행
sh """
apt-get update
apt-get install -y docker.io
#groupadd -f docker
#usermod -aG docker root
#chmod 666 /var/run/docker.sock
dockerd &
sleep 10 // Docker 데몬이 시작될 때까지 대기
"""
sh """