jenkinsfile 2 alyx
This commit is contained in:
parent
0075878076
commit
1bbb3f0ea8
@ -24,9 +24,14 @@ pipeline {
|
||||
sh 'rm /var/www/jerguero/* || true'
|
||||
// Copy new deploy
|
||||
sh 'cp /var/lib/jenkins/workspace/jerguero/target/jerguero-0.0.1.jar /var/www/jerguero'
|
||||
// Copy launch file
|
||||
sh 'cp run.sh /var/www/jerguero'
|
||||
|
||||
// run jar with pm2
|
||||
sh "pm2 start /var/www/jerguero/jerguero-0.0.1.jar --name ${env.JOB_NAME}"
|
||||
// make launch file executable
|
||||
sh 'chmod +x /var/www/jerguero/run.sh'
|
||||
|
||||
// run launch file with pm2
|
||||
sh "pm2 start /var/www/jerguero/run.sh --name ${env.JOB_NAME}"
|
||||
// Save state
|
||||
sh 'pm2 save'
|
||||
}
|
||||
|
2
run.sh
Normal file
2
run.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
java -jar jerguero-0.0.1.jar --server.port=8765
|
@ -1 +0,0 @@
|
||||
server.port=8765
|
Loading…
Reference in New Issue
Block a user