👷 Add Jenkinsfile
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 4 May 2019 20:19:04 +0000 (22:19 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 5 May 2019 11:28:42 +0000 (13:28 +0200)
Jenkinsfile [new file with mode: 0644]

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644 (file)
index 0000000..6775f35
--- /dev/null
@@ -0,0 +1,39 @@
+pipeline {
+    agent any
+
+    options {
+        timestamps()
+    }
+
+    stages {
+        stage('Build') {
+            steps {
+                sh './gradlew clean classes testClasses'
+            }
+        }
+        stage('Test') {
+            steps {
+                sh './gradlew test'
+            }
+            post {
+                always {
+                    junit 'build/test-results/test/*.xml'
+                }
+            }
+        }
+        stage('Binary') {
+            steps {
+                sh './gradlew fatJar'
+                archiveArtifacts artifacts: 'build/libs/sone*-jar-with-dependencies.jar', fingerprint: true
+            }
+        }
+        stage('Reports') {
+            steps {
+                sh './gradlew jacocoTestReport findbugsMain countLines'
+                jacoco classPattern: 'build/classes/*/main', sourcePattern: '**/src/main/'
+                findbugs canComputeNew: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', pattern: '**/findbugs/main.xml', unHealthy: ''
+                sloccountPublish encoding: '', pattern: 'build/reports/cloc/*.xml'
+            }
+        }
+    }
+}