You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2020/01/30 03:56:31 UTC

[couchdb-documentation] branch master updated: New Jenkinsfile for faster testing (#490)

This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git


The following commit(s) were added to refs/heads/master by this push:
     new d135b4b  New Jenkinsfile for faster testing (#490)
d135b4b is described below

commit d135b4b4dcbcd2662c4590049893f38534e3fcfa
Author: Joan Touzet <wo...@users.noreply.github.com>
AuthorDate: Thu Jan 30 03:56:25 2020 +0000

    New Jenkinsfile for faster testing (#490)
---
 Jenkinsfile | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..9dae139
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,59 @@
+pipeline {
+
+  agent none
+
+  environment {
+    GIT_COMMITTER_NAME = 'Jenkins User'
+    GIT_COMMITTER_EMAIL = 'couchdb@apache.org'
+    DOCKER_IMAGE = 'couchdbdev/debian-buster-erlang-all:latest'
+    DOCKER_ARGS = '-e npm_config_cache=npm-cache -e HOME=. -v=/etc/passwd:/etc/passwd -v /etc/group:/etc/group'
+  }
+
+  options {
+    buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
+    // This fails the build immediately if any parallel step fails
+    parallelsAlwaysFailFast()
+    preserveStashes(buildCount: 10)
+    timeout(time: 30, unit: 'MINUTES')
+    timestamps()
+  }
+
+  stages {
+    stage('Test') {
+      matrix {
+        axes {
+          axis {
+            name 'TARGET'
+            values "html", "man", "check"
+          }
+        }
+        stages {
+          stage('Test') {
+            agent {
+              docker {
+                image "${DOCKER_IMAGE}"
+                label 'docker'
+                args "${DOCKER_ARGS}"
+                alwaysPull true
+              }
+            }
+            options {
+              timeout(time: 90, unit: 'MINUTES')
+            }
+            steps {
+              sh '''
+                make ${TARGET}
+              '''
+            }
+            post {
+              cleanup {
+                // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894
+                sh 'rm -rf ${WORKSPACE}/*'
+              }
+            }
+          } // stage
+        } // stages
+      } // matrix
+    } // stage "Test"
+  } // stages
+} // pipeline