added Jenkinsfile

This commit is contained in:
2025-06-20 21:11:08 +04:00
parent 49c0f61ea6
commit 5d42abaad6

42
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,42 @@
pipeline {
agent any
environment {
FASTDL_CONTAINER = "fastdl"
FASTDL_PATH = "/usr/share/nginx/html"
}
stages {
stage("Checkout") {
steps {
checkout scm
}
}
stage('Build Docker Image') {
steps {
script {
sh 'docker build -t csserver:csdm ./csserver'
}
}
}
stage('Deploy with Compose') {
steps {
script {
sh 'docker-compose down || true'
sh 'docker-compose up -d'
}
}
}
post {
failure {
echo 'Build failed. Check logs.'
}
success {
echo 'Server deployed successfully.'
}
}
}
}