diff --git a/Jenkinsfile b/Jenkinsfile index 7b55e10..f04f27e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,13 +1,9 @@ pipeline { agent any + tools { + jdk 'jdk-21' + } stages { - stage('Test') { - steps { - script { - sh "sh ./gradlew clean test" - } - } - } stage('Build') { steps { script { @@ -18,7 +14,7 @@ pipeline { stage('Deploy') { steps { script { - sh "sh deploy/nio17.sh" + sh "bash deploy/nio17.sh &" } } } diff --git a/deploy/nio17.sh b/deploy/nio17.sh index d8845c9..8334d4a 100644 --- a/deploy/nio17.sh +++ b/deploy/nio17.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/ bash ./gradlew assemble scp -o StrictHostKeyChecking=no build/libs/fuzzy-controller-0.0.1-SNAPSHOT.jar root@192.168.1.129:/root/fuzzy-controller.jar -ssh root@192.168.1.129 "bash /root/run-fc.sh" \ No newline at end of file +ssh root@192.168.1.129 "killall java >> /dev/null && /opt/jdk-21/bin/java -jar /root/fuzzy-controller.jar >> /root/fc.log &" \ No newline at end of file