From 034a6b56992f16a37e931d18b295f1816894c877 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Tue, 12 Jul 2022 18:06:45 +0200 Subject: [PATCH] CI: use openstacksdk from source if it's cloned Otherwise the job on openstacksdk does not test changes. Change-Id: I521469092d4a4bfae8c7217eb949665bfe1e5981 --- playbooks/test-bifrost.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/playbooks/test-bifrost.yaml b/playbooks/test-bifrost.yaml index 5f7512e65..e2eeefbaf 100644 --- a/playbooks/test-bifrost.yaml +++ b/playbooks/test-bifrost.yaml @@ -15,11 +15,20 @@ - name: "Set testing to true" set_fact: testing: true - - name: "Set variables if running in the CI" - set_fact: - cirros_deploy_image_upstream_url: file:///opt/cache/files/cirros-0.5.1-x86_64-disk.img - copy_from_local_path: true - git_url_root: "{{ lookup('env', 'WORKSPACE') }}" + - block: + - name: "Set variables if running in the CI" + set_fact: + cirros_deploy_image_upstream_url: file:///opt/cache/files/cirros-0.5.1-x86_64-disk.img + copy_from_local_path: true + git_url_root: "{{ lookup('env', 'WORKSPACE') }}" + - name: "Check if openstacksdk is cloned" + stat: + path: "{{ git_url_root }}/openstack/openstacksdk" + register: sdk_path + - name: "Use openstacksdk from source if it's cloned" + set_fact: + openstacksdk_source_install: true + when: sdk_path.stat.exists when: lookup('env', 'ZUUL_BRANCH') | length > 0 - import_playbook: install.yaml