commit 3a6a2da74f2e3a3bf846c701424e71bad6a3a4ec Author: Dustin C. Hatch Date: Wed Mar 25 08:22:10 2020 -0500 Initial commit diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..8d164ea --- /dev/null +++ b/Containerfile @@ -0,0 +1,8 @@ +FROM arm32v7/python:3.7-slim + +RUN apt-get update && apt-get install -y \ + procps \ + gcc \ + libffi-dev \ + libssl-dev \ + && rm -rf /var/lib/apt/lists/* diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..3e3848f --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,21 @@ +pipeline { + agent { + dockerfile { + label 'arm' + filename 'Containerfile' + args '-u 0:0' + } + } + stages { + stage('Build') { + steps { + sh '. ./build.sh' + } + } + stage('Publish') { + steps { + sh '. ./publish.sh' + } + } + } +} diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..718238f --- /dev/null +++ b/build.sh @@ -0,0 +1 @@ +python3.7 -m pip wheel -w dist/ homeassistant diff --git a/publish.sh b/publish.sh new file mode 100644 index 0000000..c38c23f --- /dev/null +++ b/publish.sh @@ -0,0 +1,8 @@ +: ${PUBLISH_HOST:=files.pyrocufflink.blue} +: ${PUBLISH_PATH:=/var/lib/wheels/homeassistant} + +rsync -rtiO \ + --delete \ + --include '*.whl' \ + dist/ \ + ${PUBLISH_HOST}:${PUBLISH_PATH%/}/