mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2026-11-28 03:10:46 -06:00
ITSD-611934: Compare cached/supplied versions case-insensitively
LooseVersion only tokenises lowercase letters, so an uppercase qualifier such as 11.0.0-CONFDCDEV-4353-m02 became a single '-CONFDCDEV-' component that sorted above the GA '-z' marker. The cached milestone therefore won over the supplied GA release and upgrades silently reinstalled the milestone. Lowercase both values before comparing (comparison only). Adds product_install/confluence_cached_with_upgrade as a regression test.
This commit is contained in:
@@ -66,6 +66,13 @@
|
||||
# there is some test logic hack to allow atlassian specfic versioning
|
||||
# requirements to work as expected ie - (7.2.0 to upgrade over 7.2.0-rc1) and
|
||||
# (7.2.0-beta1 to upgrade over 7.2.0-m01) in "version is not latest"
|
||||
#
|
||||
# The comparison values are lowercased first. LooseVersion only splits
|
||||
# lowercase letters into their own components, so an uppercase qualifier
|
||||
# (e.g. 11.0.0-CONFDCDEV-4353-m02) would otherwise become a single '-CONFDCDEV-'
|
||||
# component that sorts *above* the GA '-z' marker, causing the cached
|
||||
# milestone to win over the supplied GA release. Lowercasing only affects
|
||||
# the comparison; the real version strings are left untouched.
|
||||
|
||||
- name: "Case: Version is latest"
|
||||
block:
|
||||
@@ -91,8 +98,8 @@
|
||||
|
||||
- name: "create atlassian ordered versioning for comparison"
|
||||
ansible.builtin.set_fact:
|
||||
atl_product_normalised_version: "{{ atl_z_product_version | replace('-m', '-am') }}"
|
||||
atl_cached_normalised_version: "{{ atl_z_cached_version | replace('-m', '-am') }}"
|
||||
atl_product_normalised_version: "{{ atl_z_product_version | lower | replace('-m', '-am') }}"
|
||||
atl_cached_normalised_version: "{{ atl_z_cached_version | lower | replace('-m', '-am') }}"
|
||||
|
||||
- name: "Case: No cached version, or supplied is higher; use supplied"
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
Reference in New Issue
Block a user