added Jenkinsfile
This commit is contained in:
42
Jenkinsfile
vendored
Normal file
42
Jenkinsfile
vendored
Normal 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.'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user