Add jenkinsfile for building using jenkins 2 blue ocean

This commit is contained in:
Progwml6 committed 2016-11-19 14:27:42 -05:00
1 parent 1ccbee7720
commit a9804bb1e8
1 file changed
+37
Vendored
+37
View File
@@ -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"
}
}
}
}