xci: playbooks: Fix synchronization of external scenarios 31/54431/2
authorMarkos Chandras <mchandras@suse.de>
Sat, 24 Mar 2018 19:28:02 +0000 (19:28 +0000)
committerMarkos Chandras <mchandras@suse.de>
Sat, 24 Mar 2018 19:53:08 +0000 (19:53 +0000)
The code was supposed to copy everything from
{{ xci_path }}/{{ scenario.role }} to the XCI roles directory but
external scenarios have their 'role' attribute relative to their
repository whereas internal one have it relative to the {{ xci_path }}.
As such, changes to external scenarios were not copied successfully
to the playbooks directory and their changes where never tested.
This removes the 'xci/scenarios/$scenario' part of the inbound
roles attribute to make all them relative to the
xci/scenarios/$scenario directory.

Change-Id: Id28671b30c8ee4aa6bc186444c0e5a3a3ea3d89b
Signed-off-by: Markos Chandras <mchandras@suse.de>
xci/playbooks/get-opnfv-scenario-requirements.yml

index d133048..7359082 100644 (file)
@@ -76,7 +76,7 @@
 
     - name: Synchronize local changes to scenarios' master branch
       synchronize:
-        src: "{{ xci_path }}/{{ item.item.role }}/"
+        src: "{{ xci_path }}/xci/scenarios/{{ item.item.scenario }}/{{ item.item.role | replace('xci/scenarios/{{ item.item.scenario }}', '') }}/"
         dest: "{{ role_path_default }}/{{ item.item.scenario }}"
       failed_when: false
       when: