paper-cutter/Jenkinsfile

30 lines
1016 B
Plaintext
Raw Permalink Normal View History

2021-11-29 07:46:08 +01:00
pipeline {
2021-11-29 08:27:58 +01:00
agent any
2021-11-29 13:27:43 +01:00
// We'll be running in a custom Docker image, but could be a ready-made
// image from DockerHub
//
// agent {
// docker {
// image 'loxygen/arch-latex'
// }
// }
2021-11-29 07:46:08 +01:00
stages {
stage('Test') {
steps {
2021-11-29 08:29:13 +01:00
script {
2021-11-29 13:27:43 +01:00
// Custom Docker image, see Dockerfile
2021-11-29 08:27:58 +01:00
def customImage = docker.build("paper-cutter:${env.BUILD_ID}")
customImage.inside() {
dir('test') {
2021-11-29 13:27:43 +01:00
// The user under which the job is run does not have a proper home directory (!)
2021-11-29 12:48:25 +01:00
sh 'export PATH="$PATH:/usr/bin/vendor_perl"; export fakehomedir=`pwd`/fakehome; rm -rf $fakehomedir; mkdir $fakehomedir; export HOME=$fakehomedir; git config --global user.email "testing@testing.invalid"; git config --global user.name "testing"; bash run_tests.sh'
2021-11-29 08:27:58 +01:00
}
2021-11-29 07:46:08 +01:00
}
2021-11-29 08:29:13 +01:00
}
2021-11-29 07:46:08 +01:00
}
2021-11-29 07:47:05 +01:00
}
}
2021-11-29 07:46:08 +01:00
}