From e1df8d201c34692d7a5513efb7d30a16c19dcd88 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Thu, 26 Jul 2018 18:28:43 -0500 Subject: [PATCH] ci: Add Jenkins pipeline --- ci/Jenkinsfile | 16 ++++++++++++++++ ci/publish.sh | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 ci/Jenkinsfile create mode 100644 ci/publish.sh diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile new file mode 100644 index 0000000..2b6d62a --- /dev/null +++ b/ci/Jenkinsfile @@ -0,0 +1,16 @@ +pipeline { + agent any + + environment { + PUBLISH_HOST = 'web0.pyrocufflink.blue' + PUBLISH_USER = 'webapp.dchwww' + } + + stages { + stage('Publish') { + steps { + sh '. ci/publish.sh' + } + } + } +} diff --git a/ci/publish.sh b/ci/publish.sh new file mode 100644 index 0000000..ea7786d --- /dev/null +++ b/ci/publish.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +rsync -rti . ${PUBLISH_USER}@${PUBLISH_HOST}: \ + --exclude dist/ --exclude .git +rsync -rti dist/ ${PUBLISH_USER}@${PUBLISH_HOST}:wheelhouse \ + --include '*.whl' --exclude '**' +ssh ${PUBLISH_USER}@${PUBLISH_HOST} \ + venv/bin/pip install --no-index -f wheelhouse -r requirements.txt