forked from github-mirror/CoreProtect
42 lines
733 B
Groovy
42 lines
733 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
triggers {
|
|
cron('H 3 * * *')
|
|
}
|
|
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
|
|
stage('Install Tools') {
|
|
steps {
|
|
sh '''
|
|
apt-get update -q
|
|
apt-get install -y maven
|
|
'''
|
|
}
|
|
}
|
|
|
|
stage('Build') {
|
|
steps {
|
|
sh 'mvn -B verify'
|
|
}
|
|
}
|
|
|
|
stage('Archive') {
|
|
steps {
|
|
archiveArtifacts artifacts: 'target/*.jar', fingerprint: true
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
failure {
|
|
echo 'Build failed.'
|
|
}
|
|
}
|
|
} |