mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-02-16 11:51:56 +01:00
Merge branch 'jenkinsfile' of https://github.com/AuthMe/AuthMeReloaded into jenkinsfile
This commit is contained in:
commit
301a7f803f
56
Jenkinsfile
vendored
56
Jenkinsfile
vendored
@ -5,7 +5,7 @@ pipeline {
|
|||||||
jdk 'OracleJDK 8'
|
jdk 'OracleJDK 8'
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage ('prepare') {
|
stage ('check-commit') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
env.CI_SKIP = "false"
|
env.CI_SKIP = "false"
|
||||||
@ -19,69 +19,38 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage ('clean') {
|
stage ('clean') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Cleaning the maven workspace...'
|
|
||||||
sh 'mvn clean'
|
sh 'mvn clean'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ('dependencies') {
|
stage ('dependencies') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Downloading dependencies...'
|
sh 'mvn dependency:resolve-plugins dependency:go-offline'
|
||||||
sh 'mvn dependency:go-offline'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ('validate') {
|
|
||||||
steps {
|
|
||||||
echo 'Validating the maven project...'
|
|
||||||
sh 'mvn -o validate'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ('compile') {
|
stage ('compile') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Compiling source classes...'
|
sh 'mvn -o -DskipTests install'
|
||||||
sh 'mvn -o compile'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ('compile-test') {
|
|
||||||
steps {
|
|
||||||
echo 'Compiling test classes...'
|
|
||||||
sh 'mvn -o test-compile'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ('test') {
|
stage ('test') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Performing unit testing...'
|
sh 'mvn -o surefire:test'
|
||||||
sh 'mvn -o test'
|
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
echo 'Archiving test results...'
|
|
||||||
junit 'target/surefire-reports/**/*.xml'
|
junit 'target/surefire-reports/**/*.xml'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ('package') {
|
|
||||||
steps {
|
|
||||||
echo 'Preparing the final package...'
|
|
||||||
sh 'mvn -o package'
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
success {
|
|
||||||
echo 'Archiving the final package...'
|
|
||||||
archiveArtifacts artifacts: 'target/*.jar', fingerprint: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ('sources') {
|
stage ('sources') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "master"
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
echo 'Generating sources...'
|
|
||||||
sh 'mvn -o source:jar'
|
sh 'mvn -o source:jar'
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
echo 'Archiving sources...'
|
|
||||||
archiveArtifacts artifacts: 'target/*-souces.jar', fingerprint: true
|
archiveArtifacts artifacts: 'target/*-souces.jar', fingerprint: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,12 +60,10 @@ pipeline {
|
|||||||
branch "master"
|
branch "master"
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
echo 'Generaing javadocs...'
|
|
||||||
sh 'mvn -o javadoc:javadoc javadoc:jar'
|
sh 'mvn -o javadoc:javadoc javadoc:jar'
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
echo 'Archiving javadocs...'
|
|
||||||
step([
|
step([
|
||||||
$class: 'JavadocArchiver',
|
$class: 'JavadocArchiver',
|
||||||
javadocDir: 'target/site/apidocs',
|
javadocDir: 'target/site/apidocs',
|
||||||
@ -106,25 +73,12 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ('verify') {
|
|
||||||
steps {
|
|
||||||
echo 'Performing integration testing...'
|
|
||||||
sh 'mvn -o verify'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ('install') {
|
|
||||||
steps {
|
|
||||||
echo 'Installing artifacts to the local repository...'
|
|
||||||
sh 'mvn -o install'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ('deploy') {
|
stage ('deploy') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "master"
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
echo 'Deploying to repository...'
|
sh 'mvn -DskipTests deploy'
|
||||||
sh 'mvn -o deploy'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user