ci: Always archive artifacts, only publish master
dustin/dustin.web/pipeline/head There was a failure building this commit Details

Sometimes, I want to see what the built site looks like before
publishing it.  For that, I'll push changes to a dev branch and let
Jenkins build the site as a tarball that I can download, extract, and
view locally.  Once I am satisfied, I'll merge the dev branch to master,
which Jenkins will build and publish to the live site.
Dustin 2025-08-25 23:15:57 -05:00
parent 6bb91300fe
commit a4f3b8d66e
2 changed files with 10 additions and 0 deletions

8
ci/Jenkinsfile vendored
View File

@ -26,9 +26,17 @@ pipeline {
sh '. ci/build.sh' sh '. ci/build.sh'
} }
} }
post {
success {
archiveArtifacts 'dustin.web.tar.xz'
}
}
} }
stage('Publish') { stage('Publish') {
when {
branch 'master'
}
steps { steps {
container('rsync') { container('rsync') {
sshagent(['jenkins-web']) { sshagent(['jenkins-web']) {

View File

@ -5,3 +5,5 @@ from json import dump
import sys import sys
dump(load(sys.stdin), sys.stdout) dump(load(sys.stdin), sys.stdout)
EOF EOF
tar -cJf dustin.web.tar.xz -C public .