From 51b20090f68b24fdca3c3220c9bb52e37a8e9095 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 7 May 2020 13:17:28 -0400 Subject: [PATCH] role-addition: automatically add the new molecule jobs into periodic ... so we don't have to add them manually later. Change-Id: I0e07ae2450430db45279edc123e3658aafcf7069 --- role-addition.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/role-addition.yml b/role-addition.yml index 0572b19b7..c2fcc66f0 100755 --- a/role-addition.yml +++ b/role-addition.yml @@ -66,6 +66,11 @@ {% set gate_jobs = (item['project-template']['gate']['jobs'] | sort) %} {% set _ = item['project-template']['gate'].update({'jobs': gate_jobs}) %} {% endif %} + {% if not (new_job_name in item['project-template']['periodic-weekly']['jobs']) %} + {% set _ = item['project-template']['periodic-weekly']['jobs'].append(new_job_name) %} + {% set periodic_jobs = (item['project-template']['periodic-weekly']['jobs'] | sort) %} + {% set _ = item['project-template']['periodic-weekly'].update({'jobs': periodic_jobs}) %} + {% endif %} {% endif %} {% else %} {% if item['job']['name'] == new_job_name %}