draft: ci: Build wheels and publish to wheelhost

Dustin 2019-02-16 10:55:50 -06:00
parent d6d3f8c6a8
commit 9c2ef9b9dc
4 changed files with 51 additions and 0 deletions

10
ci/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM fedora
RUN dnf install -y \
libjpeg-devel \
openssh-clients \
python3-devel \
redhat-rpm-config \
rsync \
zlib-devel \
--

33
ci/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,33 @@
pipeline {
agent {
dockerfile {
dir 'ci'
}
}
triggers {
pollSCM ''
}
environment {
PUBLISH_HOST = 'file0.pyrocufflink.blue'
XDG_CACHE_DIR = "${WORKSPACE}"
}
stages {
stage('Build') {
steps {
sh '. ci/build.sh'
}
}
stage('Publish') {
steps {
sshagent(['jenkins-sftp']) {
sh '. ci/publish.sh'
}
}
}
}
}

5
ci/build.sh Normal file
View File

@ -0,0 +1,5 @@
rm -rf .venv
python3 -m venv .venv
.venv/bin/pip install --upgrade pip setuptools wheel
.venv/bin/pip wheel -w dist -r requirements.txt

3
ci/publish.sh Normal file
View File

@ -0,0 +1,3 @@
: ${PUBLISH_PATH:=/var/lib/wheels}
rsync -aP --delete --include '*.whl' dist/ ${PUBLISH_HOST}:${PUBLISH_PATH%/}/