mirror of
https://github.com/cna-bootcamp/lifesub.git
synced 2025-12-06 16:16:22 +00:00
add cicd
This commit is contained in:
parent
c310a6b993
commit
c02f1477e9
14
deployment/Jenkinsfile
vendored
14
deployment/Jenkinsfile
vendored
@ -10,7 +10,9 @@ podTemplate(
|
|||||||
label: "${PIPELINE_ID}",
|
label: "${PIPELINE_ID}",
|
||||||
serviceAccount: 'jenkins',
|
serviceAccount: 'jenkins',
|
||||||
containers: [
|
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(
|
containerTemplate(
|
||||||
name: 'gradle',
|
name: 'gradle',
|
||||||
image: 'gradle:jdk17',
|
image: 'gradle:jdk17',
|
||||||
@ -21,6 +23,7 @@ podTemplate(
|
|||||||
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock')
|
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: '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: 'azure-cli', image: 'hiondal/azure-kubectl:latest', command: 'cat', ttyEnabled: true),
|
||||||
containerTemplate(name: 'envsubst', image: "hiondal/envsubst", command: 'sleep', args: '1h')
|
containerTemplate(name: 'envsubst', image: "hiondal/envsubst", command: 'sleep', args: '1h')
|
||||||
@ -56,13 +59,10 @@ podTemplate(
|
|||||||
|
|
||||||
stage('Build Applications') {
|
stage('Build Applications') {
|
||||||
container('gradle') {
|
container('gradle') {
|
||||||
// Docker client 설치 및 권한 설정
|
// TestContainer를 위한 Docker 데몬 실행
|
||||||
sh """
|
sh """
|
||||||
apt-get update
|
dockerd &
|
||||||
apt-get install -y docker.io
|
sleep 10 // Docker 데몬이 시작될 때까지 대기
|
||||||
#groupadd -f docker
|
|
||||||
#usermod -aG docker root
|
|
||||||
#chmod 666 /var/run/docker.sock
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
sh """
|
sh """
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user