mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 00:13:09 -06:00
Merged in WPTIN-15452-confluence-10.1-plugin_settings-from-bandana (pull request #229)
WPTIN-15452 Change base_url assert to support the change in Confluence 10.1+ to plugin_setting Approved-by: Alan Cheng
This commit is contained in:
@@ -125,17 +125,36 @@
|
||||
changed_when: false # For Molecule idempotence check
|
||||
|
||||
- name: Assert baseurl to same as atl_proxy_name
|
||||
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>"
|
||||
block:
|
||||
# For Confluence 10.1+ - use plugin_setting table with JSON 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 plugin_setting set setting_value=regexp_replace(setting_value, %s, %s)
|
||||
where namespace = '_GLOBAL' and setting_key = 'atlassian.confluence.settings';
|
||||
positional_args:
|
||||
- "\"baseUrl\":.*?(,|})"
|
||||
- "\"baseUrl\":\"{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}{{ atl_tomcat_contextpath }}\"\\1"
|
||||
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:
|
||||
- atl_proxy_name is defined
|
||||
- atl_tomcat_scheme is defined
|
||||
|
||||
Reference in New Issue
Block a user