Commit c791a16d authored by bertagaz's avatar bertagaz
Browse files

Update automated build jobs generator script.

Set the Tails RM as job recipient only for the base branches, don't set
a recipent otherwise.
parent 7d45f1f9
......@@ -16,8 +16,6 @@ class BuildTailsISOJob:
assert type(branch['job_name']) is str
assert branch['job_name'].__len__() > 0
assert type(branch['base_branch']) is bool
assert type(branch['recipients']) is str
assert branch['recipients'].__len__() > 0
assert type(snippet) is str
assert snippet.__len__() > 0
base = yaml.safe_load(snippet)
......@@ -31,9 +29,6 @@ class BuildTailsISOJob:
}]
if branch['base_branch']:
self.job['publishers'] = [{'email': { 'recipients': self.TAILS_RM_EMAIL}}]
else:
self.job['publishers'] = [{'email': { 'recipients': branch['recipients']}}]
self.job['description'] = self.DESCRIPTION_TEMPLATE % self.job['name']
def __str__(self):
return yaml.safe_dump([self.__dict__], default_flow_style=False)
......@@ -45,11 +40,9 @@ def get_active_branches():
return [{'branch_name': 'feature/test_active_branch_job',
'job_name': 'feature-test_active_branch_job',
'base_branch': False,
'recipients': 'test@test test2@test'},
{'branch_name': 'bugfix/there_should_be_two_of_them',
'job_name': 'bugfix-there_should_be_two_of_them',
'base_branch': True,
'recipients': 'test@alors.org'}
]
......
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