Add windows build to Jenkinsfile

This commit is contained in:
Tobias Gruetzmacher 2018-05-14 00:50:45 +02:00
parent 29861e761f
commit 39356bc468

22
Jenkinsfile vendored
View file

@ -51,6 +51,7 @@ pys.each { py ->
archiveArtifacts artifacts: '.tox/dist/*.zip', fingerprint: true
if (py.main) {
archiveArtifacts artifacts: 'dist/*', fingerprint: true
stash includes: 'dist/*.tar.gz', name: 'bin'
def buildVer = findFiles(glob: 'dist/*.tar.gz')[0].name.replaceFirst(/\.tar\.gz$/, '')
currentBuild.description = buildVer
@ -73,6 +74,7 @@ pys.each { py ->
timestamps {
ansiColor('xterm') {
parallel(tasks)
windowsBuild()
}
}
@ -90,4 +92,24 @@ def buildDockerfile(image) {
"""
}
def windowsBuild() {
node {
deleteDir()
unstash 'bin'
docker.image('tobix/pywine').inside {
sh '''
. /opt/mkuserwineprefix
tar xvf dist/dosage-*.tar.gz
cd dosage-*
xvfb-run sh -c "
wine py -m pip install -e .[css] &&
cd scripts &&
wine py -m PyInstaller -y dosage.spec;
wineserver -w" | tee log.txt
'''
archiveArtifacts '*/scripts/dist/*'
}
}
}
// vim: set ft=groovy: