diff --git a/staticweb/pipeline-templates/pelican.pipeline b/staticweb/pipeline-templates/pelican.pipeline new file mode 100644 index 0000000..7914ded --- /dev/null +++ b/staticweb/pipeline-templates/pelican.pipeline @@ -0,0 +1,35 @@ +// Request a node to be allocated to us +node( "StaticWeb" ) { +// We want Timestamps on everything +timestamps { + // We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed + catchError { + // First Thing: Checkout Sources + stage('Checkout Sources') { + // Make sure we have a clean slate to begin with + deleteDir() + // Code + checkout changelog: true, poll: true, scm: [ + $class: 'GitSCM', + branches: [[name: gitBranch]], + userRemoteConfigs: [[url: repositoryUrl]] + ] + } + + // Let's build website now + stage('Website build') { + sh """ + export LANG=en_US.UTF-8 + pelican ./content/ -o ./_site/ -s pelicanconf.py + """ + } + + // Deploy the website! + stage('Publishing Website') { + sh """ + rsync -Hav --delete -e "ssh -i ${deploykey}" _site/ ${deployuser}@${deployhost}:${deploypath} + """ + } + } +} +}