Compare commits
1 Commits
16d075b7e2
...
825765a52e
Author | SHA1 | Date |
---|---|---|
|
825765a52e |
|
@ -0,0 +1,7 @@
|
||||||
|
FROM fedora:28
|
||||||
|
|
||||||
|
RUN dnf install -y \
|
||||||
|
openssh-clients \
|
||||||
|
python3-pip \
|
||||||
|
python3-wheel \
|
||||||
|
rsync
|
|
@ -0,0 +1,28 @@
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
dir 'ci'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
triggers {
|
||||||
|
pollSCM ''
|
||||||
|
}
|
||||||
|
|
||||||
|
environment {
|
||||||
|
PUBLISH_HOST = 'web0.pyrocufflink.blue'
|
||||||
|
PUBLISH_USER = 'webapp.dchwww'
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Publish') {
|
||||||
|
steps {
|
||||||
|
sh 'pip3 wheel -w dist -r requirements.txt'
|
||||||
|
sshagent(['jenkins-web']) {
|
||||||
|
sh "ssh -oStrictHostKeyChecking=no ${PUBLISH_USER}@${PUBLISH_HOST} :"
|
||||||
|
sh '. 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
|
Loading…
Reference in New Issue