Commit f05bd93b authored by Ben Cooksley's avatar Ben Cooksley

Start implementing support for separate Pipelines for different Products

parent f331ca13
......@@ -12,7 +12,7 @@ knownJobs.each {
folder( "${it.product}/${it.name}" )
// Read in the necessary Pipeline template
def pipelineTemplate = readFileFromWorkspace("pipeline-templates/${it.platform}.template")
def pipelineTemplate = readFileFromWorkspace("${it.pipelineTemplate}")
// 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
......
......@@ -92,6 +92,16 @@ for product in productHandler.knownProducts():
unstableBuildEmails = productHandler.notificationsFor( product, project, failuresOnly = False )
unstableBuildEmails = ', '.join( unstableBuildEmails )
# Determine the pipeline we should be using
# Start with a generic template
pipeline = "pipeline-templates/{platform}.pipeline".format( platform=platform )
# Do we have a product specific one?
# If so, make sure we use it
productPipeline = "pipeline-templates/{product}/{platform}.pipeline".format( product=product, platform=platform )
if os.path.exists(productPipeline):
pipeline = productPipeline
# We have a winner!
jobEntry = {
'name': project.name,
......@@ -101,6 +111,7 @@ for product in productHandler.knownProducts():
'branch': branchToBuild,
'branchGroup': branchGroup,
'platform': platform,
'pipelineTemplate:' pipeline,
'description': project.description,
'environment': arguments.environment,
'buildFailureEmails': buildFailureEmails,
......
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