ci: Build wheels and publish to wheelhost
This commit introduces a Jenkins pipeline definition and accompanying shell scripts to build Wheel packages for *taiga-back*. These packages are then uploaded to the "wheelhost" (i.e *file0.pyrocufflink.blue*, presently), where they can then be used by `pip` to install Taiga on the production machine. This makes it possible to install Taiga without needing build-time dependencies on the final host.ci
parent
d6d3f8c6a8
commit
58d9351bf5
|
@ -0,0 +1,11 @@
|
|||
FROM fedora:28
|
||||
|
||||
RUN useradd -M -l -u 3000018 jenkins
|
||||
RUN dnf install -y \
|
||||
gcc \
|
||||
libjpeg-devel \
|
||||
openssh-clients \
|
||||
python3-devel \
|
||||
rsync \
|
||||
zlib-devel \
|
||||
--
|
|
@ -0,0 +1,34 @@
|
|||
pipeline {
|
||||
agent {
|
||||
dockerfile {
|
||||
dir 'ci'
|
||||
args '-v /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts:ro'
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
pollSCM ''
|
||||
}
|
||||
|
||||
environment {
|
||||
PUBLISH_HOST = 'file0.pyrocufflink.blue'
|
||||
XDG_CACHE_HOME = "${WORKSPACE}"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh '. ci/build.sh'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish') {
|
||||
steps {
|
||||
sshagent(['jenkins-sftp']) {
|
||||
sh '. ci/publish.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
rm -rf .venv
|
||||
python3.6 -m venv .venv
|
||||
|
||||
rm -rf dist
|
||||
.venv/bin/pip install --upgrade pip setuptools wheel
|
||||
.venv/bin/pip wheel -w dist -r requirements.txt
|
||||
|
||||
sed -i '/^-i/d' requirements.txt
|
|
@ -0,0 +1,9 @@
|
|||
: ${PUBLISH_PATH:=/var/lib/wheels/taiga}
|
||||
|
||||
rsync -rtiO \
|
||||
--delete \
|
||||
--include '*.whl' \
|
||||
--include requirements.txt \
|
||||
dist/ \
|
||||
requirements.txt \
|
||||
${PUBLISH_HOST}:${PUBLISH_PATH%/}/
|
Loading…
Reference in New Issue