mirror of
https://github.com/cna-bootcamp/lifesub.git
synced 2025-12-07 08:26:23 +00:00
add cicd
This commit is contained in:
parent
6a8947dcab
commit
7af085f468
24
deployment/Jenkinsfile
vendored
24
deployment/Jenkinsfile
vendored
@ -10,20 +10,14 @@ podTemplate(
|
|||||||
label: "${PIPELINE_ID}",
|
label: "${PIPELINE_ID}",
|
||||||
serviceAccount: 'jenkins',
|
serviceAccount: 'jenkins',
|
||||||
containers: [
|
containers: [
|
||||||
containerTemplate(name: "docker", image: "docker:latest", privileged: true, ttyEnabled: true, command: "cat"),
|
containerTemplate(name: 'gradle',
|
||||||
containerTemplate(name: 'gradle', image: 'gradle:jdk17', ttyEnabled: true, command: 'cat'),
|
|
||||||
/*
|
|
||||||
containerTemplate(
|
|
||||||
name: 'gradle',
|
|
||||||
image: 'gradle:jdk17',
|
image: 'gradle:jdk17',
|
||||||
ttyEnabled: true,
|
ttyEnabled: true,
|
||||||
command: 'cat',
|
command: 'cat',
|
||||||
privileged: true,
|
envVars: [
|
||||||
volumes: [
|
envVar(key: 'DOCKER_HOST', value: 'unix:///run/podman/podman.sock'),
|
||||||
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock')
|
envVar(key: 'TESTCONTAINERS_RYUK_DISABLED', value: 'true')
|
||||||
]
|
]),
|
||||||
),
|
|
||||||
*/
|
|
||||||
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')
|
||||||
@ -59,13 +53,11 @@ podTemplate(
|
|||||||
|
|
||||||
stage('Build Applications') {
|
stage('Build Applications') {
|
||||||
container('gradle') {
|
container('gradle') {
|
||||||
// TestContainer를 위한 Docker 데몬 실행
|
// TestContainers가 Podman을 사용하도록 설정
|
||||||
sh """
|
sh """
|
||||||
dockerd &
|
export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/run/podman/podman.sock
|
||||||
sleep 10
|
export DOCKER_HOST=unix:///run/podman/podman.sock
|
||||||
"""
|
|
||||||
|
|
||||||
sh """
|
|
||||||
chmod +x gradlew
|
chmod +x gradlew
|
||||||
./gradlew :member:clean :member:build
|
./gradlew :member:clean :member:build
|
||||||
./gradlew :mysub-infra:clean :mysub-infra:build
|
./gradlew :mysub-infra:clean :mysub-infra:build
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user