add Jenkinsfile
Some checks failed
CI fuzzy controller / container-test-job (push) Has been cancelled
Some checks failed
CI fuzzy controller / container-test-job (push) Has been cancelled
This commit is contained in:
parent
c757c6d246
commit
29990ca26e
35
Jenkinsfile
vendored
Normal file
35
Jenkinsfile
vendored
Normal 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
4
deploy/nio17.sh
Normal 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"
|
Loading…
x
Reference in New Issue
Block a user