Compare commits

..

2 Commits

Author SHA1 Message Date
29990ca26e add Jenkinsfile
Some checks failed
CI fuzzy controller / container-test-job (push) Has been cancelled
2025-02-17 15:21:47 +04:00
c757c6d246 Fix ci 2025-02-16 21:29:26 +04:00
3 changed files with 45 additions and 2 deletions

View File

@ -3,9 +3,13 @@ on: [push]
jobs:
container-test-job:
runs-on: ubuntu-latest
container:
image: exoplatform/jdk:openjdk-21-ubuntu-2204
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21 for x64
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
architecture: x64
- name: Test with Gradle
run: bash ./gradlew test

35
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,35 @@
pipeline {
agent any
stages {
stage('Test') {
steps {
script {
sh "sh ./gradlew clean test"
}
}
}
stage('Build') {
steps {
script {
sh "sh ./gradlew clean build"
}
}
}
stage('Deploy') {
steps {
script {
sh "sh deploy/nio17.sh"
}
}
}
}
post {
always {
script {
if (currentBuild.currentResult == 'FAILURE') {
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "a.romanov@ulstu.ru", sendToIndividuals: true])
}
}
}
}
}

4
deploy/nio17.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
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"