Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 95f2ff59 authored by Bhushan Shah's avatar Bhushan Shah 📱

staticweb: Make tempate generic enough

parent 48617fe6
......@@ -10,7 +10,15 @@ knownJobs.each {
def cronSchedule = "${it.cron}"
// Read in the necessary Pipeline script
def pipelineScript = readFileFromWorkspace("staticweb/${it.name}.pipeline")
def pipelineTemplate = readFileFromWorkspace("staticweb/${it.type}.pipeline")
// Now we can construct our Pipeline script
// We append a series of variables to the top of it to provide a variety of useful information to the otherwise templated script
// These appended variables are what makes one build different to the next, aside from the template which was used
def pipelineScript = """
|def name = "${it.name}"
|def deploypath = "${it.deploypath}"
|${pipelineTemplate}""".stripMargin()
// Actually create the job now
pipelineJob( jobName ) {
......
[
{"name": "plasma-mobile-org", "cron": "@hourly"}
{"name": "plasma-mobile-org", "cron": "@hourly", "type": "plasma-mobile-org", "deploypath": "/srv/www/generated/plasma-mobile.org/"}
]
......@@ -8,11 +8,11 @@ timestamps {
stage('Checkout Sources') {
// Make sure we have a clean slate to begin with
deleteDir()
// plasma-mobile.org Code
// Code
checkout changelog: true, poll: true, scm: [
$class: 'GitSCM',
branches: [[name: 'master']],
userRemoteConfigs: [[url: 'https://anongit.kde.org/websites/plasma-mobile-org.git']]
userRemoteConfigs: [[url: 'https://anongit.kde.org/websites/${name}.git']]
]
}
......@@ -28,7 +28,7 @@ timestamps {
// Deploy the website!
stage('Publishing Website') {
sh """
rsync -Hav --delete -e "ssh -i $HOME/WebsitePublishing/website-upload.key" _site/ sitedeployer@olios.kde.org:/srv/www/generated/plasma-mobile.org/
rsync -Hav --delete -e "ssh -i $HOME/WebsitePublishing/website-upload.key" _site/ sitedeployer@olios.kde.org:${deploypath}
"""
}
}
......
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