So far, if odl_version was not defined, we would use the latest release.
Unfortunately, ansible 'lookup' will return an empty string if the
variable does not exist and thus odl_version will always be defined:
https://github.com/ansible/ansible/issues/17329
We use ansible 'lookup' in xci to collect the values from env variables
To overcome this, we will allow a new value for odl_version in XCI:
"latest_release". This patch adapts to that new possible value
Change-Id: Ie4d76ed576ddeded130a863f847cd51cb7491456
Signed-off-by: Manuel Buil <mbuil@suse.com>
auto_import_keys: yes
disable_gpg_check: yes
runrefresh: yes
- when: odl_version is defined
+ when: "'latest_release' not in odl_version"
- name: Add ODL zypper repo
zypper_repository:
name: opendaylight
auto_import_keys: yes
runrefresh: yes
- when: odl_version is undefined
+ when: "'latest_release' in odl_version"
# URL of the .repo config to use when installing ODL from a repo
# NB: This will only take effect when `install_method` is "rpm_repo"
-rpm_repo_url: "{% if odl_version is defined %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version_dict[odl_version] }}-devel.repo{% else %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-8-devel.repo{% endif %}"
-suse_rpm_repo_url: "{% if odl_version is defined %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version_dict[odl_version] }}-opensuse-devel.repo{% else %}https://download.opensuse.org/repositories/Virtualization:/NFV/openSUSE_Leap_42.3/{% endif %}"
+rpm_repo_url: "{% if 'latest_release' not in odl_version %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version_dict[odl_version] }}-devel.repo{% else %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-8-devel.repo{% endif %}"
+suse_rpm_repo_url: "{% if 'latest_release' not in odl_version %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version_dict[odl_version] }}-opensuse-devel.repo{% else %}https://download.opensuse.org/repositories/Virtualization:/NFV/openSUSE_Leap_42.3/{% endif %}"
# URL of the deb repository to use when installing ODL from a repo
# NB: This will only take effect when `install_method` is "deb_repo"