This commit is contained in:
areeqakbr 2025-02-18 14:01:40 +07:00
parent 5a88cc575b
commit f4534edf70
1 changed files with 2 additions and 4 deletions

6
Jenkinsfile vendored
View File

@ -21,18 +21,16 @@ pipeline {
}
}
stage('Pulling, Building, and Deploying') {
stage('Build and Deploy') {
steps {
sh 'cd /home/developer/backend_nam'
sh 'git pull origin main'
sh 'go mod tidy'
sh 'go build -o myapp'
sh 'cp myapp /home/developer/backend_nam/'
}
}
stage('Restart Service') {
steps {
// Add your deployment steps here
sh 'sudo systemctl daemon-reload'
sh 'sudo systemctl restart backend-nam'
}