Edit Jenkinsfile

This commit is contained in:
Viktoriia Karpenko 2024-12-11 16:48:47 +02:00
parent b51b95031b
commit 916797136f

16
Jenkinsfile vendored
View file

@ -3,9 +3,23 @@ pipeline {
stages {
stage ('Checkstyle') {
steps {
sh 'mvn validate'
sh 'mvn checkstyle:checkstyle'
archiveArtifacts artifacts: 'target/checkstyle-report.xml', allowEmptyArchive: true
}
}
stage ('Test') {
steps {
sh 'echo "Starting tests..."'
sh 'mvn test'
junit 'target/surefire-reports/*.xml'
}
}
stage ('Build') {
steps {
sh 'echo "Building..."'
sh 'mvn clean package'
archiveArtifacts artifacts: 'target/*.jar', allowEmptyArchive: false
}
}
}
}