ci: Always archive artifacts, only publish master
dustin/dustin.web/pipeline/head There was a failure building this commit
Details
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.
parent
6bb91300fe
commit
a4f3b8d66e
|
@ -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']) {
|
||||||
|
|
|
@ -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 .
|
||||||
|
|
Loading…
Reference in New Issue