Commit cd3cb57f authored by intrigeri's avatar intrigeri
Browse files

Use a named placeholder in template.

parent 7bf94b55
......@@ -8,7 +8,7 @@ class BuildTailsISOJob:
DESCRIPTION_TEMPLATE = \
'''<p>This job is managed by jenkins-job-builder. Do not edit it through this web interface, your changes would be overwritten.</p>
<p>You can <a href="http://nightly.tails.boum.org/%s/">download build results</a>.</p>'''
<p>You can <a href="http://nightly.tails.boum.org/%(job_name)s/">download build results</a>.</p>'''
def __init__(self, snippet, branch):
assert type(branch['branch_name']) is str
......@@ -28,7 +28,9 @@ class BuildTailsISOJob:
}]
if branch['base_branch']:
self.job['publishers'] = [{'email': { 'recipients': self.TAILS_RM_EMAIL}}]
self.job['description'] = self.DESCRIPTION_TEMPLATE % self.job['name']
self.job['description'] = self.DESCRIPTION_TEMPLATE % {
'job_name': self.job['name']
}
def __str__(self):
return yaml.safe_dump([{'job': self.job}], default_flow_style=False)
......
Supports Markdown
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