aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/ci-config
diff options
context:
space:
mode:
authorSpacelord <Spacelord09@users.noreply.github.com>2021-06-30 01:59:55 +0200
committerSpacelord <Spacelord09@users.noreply.github.com>2021-06-30 01:59:55 +0200
commit6f089c7beeae6ff56bab626bc9cee52800e3b155 (patch)
treee6c8c7f30495bb0712ce85828b7d8aa9ff541056 /assets/ci-config
parent12142b4808a84eb9328213997be085cb583c101c (diff)
downloadmidimonster-6f089c7beeae6ff56bab626bc9cee52800e3b155.tar.gz
midimonster-6f089c7beeae6ff56bab626bc9cee52800e3b155.tar.bz2
midimonster-6f089c7beeae6ff56bab626bc9cee52800e3b155.zip
Move to Jenkins CI, introduce new CI script
Diffstat (limited to 'assets/ci-config')
-rw-r--r--assets/ci-config73
1 files changed, 73 insertions, 0 deletions
diff --git a/assets/ci-config b/assets/ci-config
new file mode 100644
index 0000000..5e8df68
--- /dev/null
+++ b/assets/ci-config
@@ -0,0 +1,73 @@
+#!/usr/bin/env groovy
+
+/*
+ * This Jenkinsfile is intended to run on https://ci.spacecdn.de and may fail anywhere else.
+ * It makes assumptions about plugins being installed, labels mapping to nodes that can build what is needed, etc.
+ */
+
+def buildTypes = ['linux', 'windows']
+def builds = [:]
+
+//if(env.TAG_NAME) {
+// buildTypes.add("debian")
+//}
+
+buildTypes.each{
+ builds["$it"] = {
+ node() {
+ skipDefaultCheckout()
+ stage('Checkout') {
+ checkout scm
+ }
+
+ stage("$it Build"){
+ sh label: "Build", script: "./assets/ci.sh --target=build-$it --deploy"
+ }
+
+ stage('Stash artifacts') {
+ stash includes: "deployment/$it/*", name: "$it", allowEmpty: 'false'
+ }
+ }
+ }
+}
+
+def deploy = {
+ node(){
+ skipDefaultCheckout()
+ stage('Deploy') {
+ buildTypes.each{
+ unstash "$it"
+ }
+ archiveArtifacts artifacts: 'deployment/*/*', onlyIfSuccessful: true, fingerprint: true
+ }
+ }
+}
+
+builds.Test = {
+ node() {
+ skipDefaultCheckout()
+ stage('Checkout') {
+ checkout scm
+ }
+ stage('Test') {
+ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
+ sh label: "Check Spelling", script: './assets/ci.sh --target=check-spelling'
+ }
+ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
+ sh label: "Check Codespelling", script: './assets/ci.sh --target=check-codespelling'
+ }
+ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
+ sh label: "Analyze Complexity", script: './assets/ci.sh --target=analyze-complexity'
+ }
+ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
+ sh label: "Analyze Shellscripts", script: './assets/ci.sh--target=analyze-shellscript'
+ }
+ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
+ sh label: "Code Statistics", script: '../assets/ci.sh --target=stats'
+ }
+ }
+ }
+}
+
+parallel builds
+deploy.call() \ No newline at end of file