From 48e65bd53d4be5dd203a1053302071e7a7074d15 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 18 Feb 2025 11:30:06 +0400 Subject: [PATCH] #13 -- Fix ci --- Jenkinsfile | 12 ++++-------- deploy/nio17.sh | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) 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