From: Charles McGarvey Date: Sun, 14 Apr 2019 17:44:27 +0000 (-0600) Subject: add jenkinsfile X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=9557308f5150e5baf3dddd16590c5bad85c89d80;p=chaz%2Fp5-HTTP-AnyUA add jenkinsfile --- diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..ca2d132 --- /dev/null +++ b/Jenkinsfile @@ -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' + } + } + } +} +