ci: Always archive artifacts, only publish master
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.master
parent
59ef8ff5ad
commit
313bc6805e
|
@ -26,9 +26,17 @@ pipeline {
|
|||
sh '. ci/build.sh'
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts 'dustin.web.tar.xz'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
container('rsync') {
|
||||
sshagent(['jenkins-web']) {
|
||||
|
|
|
@ -5,3 +5,5 @@ from json import dump
|
|||
import sys
|
||||
dump(load(sys.stdin), sys.stdout)
|
||||
EOF
|
||||
|
||||
tar -cJf dustin.web.tar.xz -C public .
|
||||
|
|
Loading…
Reference in New Issue