Correct Jenkinsfile
This commit is contained in:
parent
f3cdfc532c
commit
cd450475f7
2 changed files with 12 additions and 8 deletions
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
@ -9,25 +9,30 @@ pipeline {
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh 'mvn package'
|
sh 'mvn -B -DskipTests clean package'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
archiveArtifacts artifacts: 'target/*.jar, target/*.exe'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
steps {
|
steps {
|
||||||
sh 'mvn test'
|
sh 'mvn test'
|
||||||
}
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
junit 'target/surefire-reports/*.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
steps {
|
steps {
|
||||||
// TODO: consider switch to docker registry
|
|
||||||
sh 'cp ./target/InnaIrcBot-*-jar-with-dependencies.jar /rel/InnaIrcBot.jar'
|
sh 'cp ./target/InnaIrcBot-*-jar-with-dependencies.jar /rel/InnaIrcBot.jar'
|
||||||
|
// TODO: consider switch to docker registry
|
||||||
// sh 'docker restart innaircbot'
|
// sh 'docker restart innaircbot'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
|
||||||
always {
|
|
||||||
archiveArtifacts artifacts: 'target/*-jar-with-dependencies.jar', onlyIfSuccessful: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -6,7 +6,6 @@ import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.*;
|
import java.net.*;
|
||||||
import java.util.concurrent.ArrayBlockingQueue;
|
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue