add jenkinsfile
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sun, 14 Apr 2019 17:44:27 +0000 (11:44 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sun, 14 Apr 2019 17:44:27 +0000 (11:44 -0600)
Jenkinsfile [new file with mode: 0644]

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644 (file)
index 0000000..ca2d132
--- /dev/null
@@ -0,0 +1,51 @@
+pipeline {
+    agent none
+    /* environment { */
+       /* HOME = '/tmp/whatever' */
+    /* } */
+    stages {
+        stage('Build') {
+           agent {
+               dockerfile {
+                   filename 'Dockerfile.test'
+                   args '-u root'
+               }
+           }
+           environment {
+               HARNESS_OPTIONS = 'fTAP-Formatter-JUnit'
+               HARNESS_TIMER = '1'
+               PERL_TEST_HARNESS_DUMP_TAP = 'testreports'
+           }
+            steps {
+               /* sh 'mkdir -p $HOME' */
+                sh 'make bootstrap dist'
+                sh 'dzil test --keep'
+               stash includes: 'HTTP-AnyUA-*.tar.gz', name: 'dist'
+               archiveArtifacts artifacts: 'HTTP-AnyUA-*.tar.gz', fingerprint: true
+            }
+           post {
+               always {
+                   junit '.build/latest/testreports/**/*.junit.xml'
+                   /* have to clean up else root-owned files will be left in
+                    * the workspace directory */
+                   sh 'make clean'
+                   /* sh 'chown -R $(stat -c %u .):$(stat -c %g .) .' */
+               }
+           }
+        }
+        stage('Test') {
+           agent {
+               dockerfile {
+                   filename 'Dockerfile.test'
+                   args '-u root'
+               }
+           }
+            steps {
+               unstash 'dist'
+               sh 'ls -lh'
+               sh 'cpanm *.tar.gz'
+            }
+        }
+    }
+}
+
This page took 0.020895 seconds and 4 git commands to generate.