Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 66dc2583 authored by Bhushan Shah's avatar Bhushan Shah 📱

Add pipeline for the static web generation

parent 7e485dde
// Read the contents of the gathered-jobs.json file a step created for us previously
def jobsToParse = readFileFromWorkspace('staticweb/jobs.json')
def knownJobs = new groovy.json.JsonSlurper().parseText( jobsToParse )
// Iterate over all of the known jobs and create them!
knownJobs.each {
// Save our job name for later
def jobName = "Website ${}"
// Likewise with our cron schedule
def cronSchedule = "${it.cron}"
// Read in the necessary Pipeline script
def pipelineScript = readFileFromWorkspace("staticweb/${}.pipeline")
// Actually create the job now
pipelineJob( jobName ) {
properties {
// We don't want to keep build results forever
// We'll set it to keep the last 10 builds and discard everything else
buildDiscarder {
strategy {
logRotator {
// We don't want to be building the same project more than once
// This is to prevent one project hogging resources
// And also has a practical component as otherwise an older build could finish afterwards and upload old build results
triggers {
// We want to automatically rebuild once a day
cron( cronSchedule )
// This is where the Pipeline script actually happens :)
definition {
cps {
script( pipelineScript )
{"name": "plasma-mobile-org", "cron": "@hourly"}
// 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
// Code
checkout changelog: true, poll: true, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
userRemoteConfigs: [[url: '']]
// Let's build website now
stage('Website build') {
sh """
cd plasma-mobile-org/
pluto update planet.ini
ruby -r 'jekyll/planet' -e 'JekyllPlanet.main'
# Workaround for non-complete image urls in Bhushan Shah's blog
for post in _posts/*; do
if grep "author:" $post | grep "Bhushan Shah" >/dev/null; then
sed -i -e 's_/images_' $post
jekyll build
cd _site; tar cvzf ../plasma-mobile-org.tar.gz .
stage('Capturing Artifacts') {
archiveArtifacts artifacts: '*.tar.gz', onlyIfSuccessful: true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment