From 4eed6a3f82e9a33edbbec4d00726a6cec289bd81 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sat, 16 Feb 2019 10:55:50 -0600 Subject: [PATCH] draft: ci: Build wheels and publish to wheelhost --- ci/Dockerfile | 8 ++++++++ ci/Jenkinsfile | 22 ++++++++++++++++++++++ ci/build.sh | 5 +++++ ci/publish.sh | 3 +++ 4 files changed, 38 insertions(+) create mode 100644 ci/Dockerfile create mode 100644 ci/Jenkinsfile create mode 100644 ci/build.sh create mode 100644 ci/publish.sh diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 00000000..d6443510 --- /dev/null +++ b/ci/Dockerfile @@ -0,0 +1,8 @@ +FROM fedora + +RUN dnf install -y \ + libjpeg-devel \ + python3-devel \ + redhat-rpm-config \ + zlib-devel \ + -- diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile new file mode 100644 index 00000000..5f51f92d --- /dev/null +++ b/ci/Jenkinsfile @@ -0,0 +1,22 @@ +pipeline { + agent { + dockerfile { + dir 'ci' + } + } + + stages { + stage('Build') { + steps { + sh '. ci/build.sh' + } + } + + stage('Publish') { + steps { + sh '. ci/publish.sh' + } + } + } + +} diff --git a/ci/build.sh b/ci/build.sh new file mode 100644 index 00000000..1c4e91ea --- /dev/null +++ b/ci/build.sh @@ -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 diff --git a/ci/publish.sh b/ci/publish.sh new file mode 100644 index 00000000..aa88ee3d --- /dev/null +++ b/ci/publish.sh @@ -0,0 +1,3 @@ +: ${PUBLISH_PATH:-/var/lib/wheels} + +rsync -aP --delete --include '*.whl' dist/ ${PUIBLISH_HOST}:${PUBLISH_PATH%/}/