mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-15 09:23:06 -06:00
WPTIN-15452 Change base_url assert to support the change in Confluence 10.1+ to plugin_setting
This commit is contained in:
@@ -125,17 +125,36 @@
|
|||||||
changed_when: false # For Molecule idempotence check
|
changed_when: false # For Molecule idempotence check
|
||||||
|
|
||||||
- name: Assert baseurl to same as atl_proxy_name
|
- name: Assert baseurl to same as atl_proxy_name
|
||||||
community.postgresql.postgresql_query:
|
block:
|
||||||
login_host: "{{ atl_db_host }}"
|
# For Confluence 10.1+ - use plugin_setting table with JSON format
|
||||||
login_user: "{{ atl_jdbc_user }}"
|
- name: Assert baseurl to same as atl_proxy_name (Confluence 10.1+)
|
||||||
login_password: "{{ atl_jdbc_password }}"
|
community.postgresql.postgresql_query:
|
||||||
db: "{{ atl_jdbc_db_name }}"
|
login_host: "{{ atl_db_host }}"
|
||||||
query: >
|
login_user: "{{ atl_jdbc_user }}"
|
||||||
update bandana set bandanavalue=regexp_replace(bandanavalue, %s, %s)
|
login_password: "{{ atl_jdbc_password }}"
|
||||||
where bandanacontext = '_GLOBAL' and bandanakey = 'atlassian.confluence.settings';
|
db: "{{ atl_jdbc_db_name }}"
|
||||||
positional_args:
|
query: >
|
||||||
- "<baseUrl>.*</baseUrl>"
|
update plugin_setting set setting_value=regexp_replace(setting_value, %s, %s)
|
||||||
- "<baseUrl>{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}{{ atl_tomcat_contextpath }}</baseUrl>"
|
where namespace = '_GLOBAL' and setting_key = 'atlassian.confluence.settings';
|
||||||
|
positional_args:
|
||||||
|
- "\"baseUrl\":.*?,"
|
||||||
|
- "\"baseUrl\":\"{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}{{ atl_tomcat_contextpath }}\","
|
||||||
|
when: atl_product_version is version('10.1', '>=')
|
||||||
|
|
||||||
|
# For Confluence < 10.1 - use bandana table with XML format
|
||||||
|
- name: Assert baseurl to same as atl_proxy_name (Confluence < 10.1)
|
||||||
|
community.postgresql.postgresql_query:
|
||||||
|
login_host: "{{ atl_db_host }}"
|
||||||
|
login_user: "{{ atl_jdbc_user }}"
|
||||||
|
login_password: "{{ atl_jdbc_password }}"
|
||||||
|
db: "{{ atl_jdbc_db_name }}"
|
||||||
|
query: >
|
||||||
|
update bandana set bandanavalue=regexp_replace(bandanavalue, %s, %s)
|
||||||
|
where bandanacontext = '_GLOBAL' and bandanakey = 'atlassian.confluence.settings';
|
||||||
|
positional_args:
|
||||||
|
- "<baseUrl>.*</baseUrl>"
|
||||||
|
- "<baseUrl>{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}{{ atl_tomcat_contextpath }}</baseUrl>"
|
||||||
|
when: atl_product_version is version('10.1', '<')
|
||||||
when:
|
when:
|
||||||
- atl_proxy_name is defined
|
- atl_proxy_name is defined
|
||||||
- atl_tomcat_scheme is defined
|
- atl_tomcat_scheme is defined
|
||||||
|
|||||||
Reference in New Issue
Block a user