--- /dev/null
+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'
+ }
+ }
+ }
+}
+