mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-25 14:24:40 +00:00
Add jenkinsfile for building using jenkins 2 blue ocean
This commit is contained in:
1 parent
1ccbee7720
commit
a9804bb1e8
1 file changed
+37
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
checkout scm
|
||||
sh "rm -rf build/libs"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Setup') {
|
||||
steps {
|
||||
sh "./gradlew clean setupCIWorkspace --no-daemon"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh "./gradlew build -PBUILD_NUMBER=${env.BUILD_NUMBER} --no-daemon"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Archive') {
|
||||
steps {
|
||||
archive includes: 'build/libs/*.jar'
|
||||
junit allowEmptyResults: true, testResults: 'build/test-results/**/*.xml'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
sh "./gradlew publishMavenJavaPublicationToMavenRepository -PBUILD_NUMBER=${env.BUILD_NUMBER} -PDEPLOY_DIR=${env.MAVEN_DEPLOY_DIR} --no-daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user