[📝] GIT init
Some checks failed
SPMS_API/pipeline/head There was a failure building this commit

This commit is contained in:
SEAN 2025-12-03 12:12:45 +09:00
commit 9df3845327
3 changed files with 127 additions and 0 deletions

59
.gitignore vendored Normal file
View File

@ -0,0 +1,59 @@
# 특정 환경에 따라 추가
./private/
./privacy/
./publish/
publish/
./bin/
# 기본 파일 및 폴더 제외
*.log
*.env
*.bak
*.tmp
*.swp
# macOS 관련 파일 제외
._*
.DS_Store
.AppleDouble
.LSOverride
.Spotlight-V100
.Trashes
# Windows 관련
Thumbs.db
ehthumbs.db
desktop.ini
# Visual Studio 관련
.vscode/
.vs/
*.suo
*.user
*.userosscache
*.sln.docstates
# Rider 관련
.idea/
*.sln.iml
# .NET 관련
bin/
obj/
*.pdb
*.dll
*.exe
*.nuget/
# Blazor 관련
**/wwwroot/_framework/
# Docker 관련
docker-compose.override.yml
Dockerfile
# 기타 캐시 파일
**/*.cache
**/*.tmp

67
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,67 @@
pipeline {
agent any
environment {
TARGET_BUILD_CONTAINER = ''
TARGET_RUN_CONTAINER = ''
CONTAINER_SRC_PATH = '/src'
}
stages {
stage('Check Branch & Setup ENV') {
steps {
script {
def branchName = env.BRANCH_NAME
echo "Current Git Branch : ${branchName}"
if (branchName == 'develop') {
env.TARGET_BUILD_CONTAINER = 'spms-back-build-debug'
env.TARGET_RUN_CONTAINER = 'spms-run-debug'
echo "[DEV Mode] SET DEBUG Container"
}
else if (branchName == 'main') {
env.TARGET_BUILD_CONTAINER = 'spms-back-build-release'
env.TARGET_RUN_CONTAINER = 'spms-run-release'
echo ">>> [PROD Mode] SET Release Container
} else {
error "This branch(${branchName}) can't set container (USE develop or main branch)"
}
}
}
}
stage('Checkout Source') {
steps {
cleanWs()
checkout scm
echo "Git Checkout Complete"
}
}
stage('Copy to Container') {
steps {
script {
def containerId = sh(script: "docker ps -aqf 'name=${env.TARGET_BUILD_CONTAINER}'", returnStdout: true).trim()
if (containerId) {
sh "docker cp ${WORKSPACE}/. ${env.TARGET_BUILD_CONTAINER}:${env.CONTAINER_SRC_PATH}"
echo "Source code copied to ${env.TARGET_BUILD_CONTAINER}"
} else {
error "Build container ${env.TARGET_BUILD_CONTAINER} not found!"
}
}
}
}
stage('Build & Deploy') {
steps {
script {
echo "Building..."
sh "docker start -a ${env.TARGET_BUILD_CONTAINER}"
echo "Restarting..."
sh "docker restart ${env.TARGET_RUN_CONTAINER}"
}
}
}
}
}

1
README.md Normal file
View File

@ -0,0 +1 @@
# SPMS