mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 08:53:07 -06:00
DCD-1020: Add installation and linking of Google Noto fonts as JVM fallbacks.
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
atl_jvm_heap: "2048m"
|
atl_jvm_heap: "2048m"
|
||||||
|
atl_fonts_fallback_dirs:
|
||||||
|
- "{{ atl_java_home }}/lib/fonts/fallback/"
|
||||||
|
- "{{ atl_jre_home }}/lib/fonts/fallback/"
|
||||||
|
|
||||||
|
|
||||||
atl_autologin_cookie_age: "{{ lookup('env', 'ATL_AUTOLOGIN_COOKIE_AGE') }}"
|
atl_autologin_cookie_age: "{{ lookup('env', 'ATL_AUTOLOGIN_COOKIE_AGE') }}"
|
||||||
|
|
||||||
|
|||||||
@@ -79,3 +79,12 @@ def test_confluence_config_file(host):
|
|||||||
assert f.contains('<property name="hibernate.connection.url">jdbc:postgresql://postgres-db.ap-southeast-2.rds.amazonaws.com:5432/confluence</property>')
|
assert f.contains('<property name="hibernate.connection.url">jdbc:postgresql://postgres-db.ap-southeast-2.rds.amazonaws.com:5432/confluence</property>')
|
||||||
assert f.contains('<property name="hibernate.connection.password">molecule_password</property>')
|
assert f.contains('<property name="hibernate.connection.password">molecule_password</property>')
|
||||||
assert f.contains('<property name="hibernate.c3p0.preferredTestQuery">select 1;</property>')
|
assert f.contains('<property name="hibernate.c3p0.preferredTestQuery">select 1;</property>')
|
||||||
|
|
||||||
|
@pytest.mark.parametrize('font', [
|
||||||
|
# '/usr/lib/jvm/java/lib/fonts/fallback/NotoSansJavanese-Regular.ttf',
|
||||||
|
# '/usr/lib/jvm/jre/lib/fonts/fallback/NotoSansJavanese-Regular.ttf'
|
||||||
|
'/opt/atlassian/confluence/current/jre/lib/fonts/fallback/NotoSansJavanese-Regular.ttf'
|
||||||
|
])
|
||||||
|
def test_fonts_installed_and_linked(host, font):
|
||||||
|
f = host.file(font)
|
||||||
|
assert f.exists
|
||||||
|
|||||||
15
roles/confluence_config/tasks/amazon_fonts.yml
Normal file
15
roles/confluence_config/tasks/amazon_fonts.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Install Google Noto fonts for language coverage
|
||||||
|
yum:
|
||||||
|
name:
|
||||||
|
- "google-noto-*"
|
||||||
|
|
||||||
|
- name: Link the language fonts into the JDK/JRE
|
||||||
|
# Not idiomatic, but cleaner that messing with nested lookups...
|
||||||
|
shell:
|
||||||
|
cmd: "ln -sf /usr/share/fonts/google-noto*/* {{ item }}/"
|
||||||
|
creates: "{{ item }}/NotoSansJavanese-Regular.ttf"
|
||||||
|
warn: false
|
||||||
|
with_items: "{{ atl_fonts_fallback_dirs }}"
|
||||||
|
changed_when: false # For Molecule idempotence check
|
||||||
@@ -125,3 +125,13 @@
|
|||||||
tags:
|
tags:
|
||||||
- skip_on_stack_update
|
- skip_on_stack_update
|
||||||
ignore_errors: yes # For Molecule as it has no db test framework included
|
ignore_errors: yes # For Molecule as it has no db test framework included
|
||||||
|
|
||||||
|
- name: Create JVM font fallback directories
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
with_items: "{{ atl_fonts_fallback_dirs }}"
|
||||||
|
|
||||||
|
- name: Install & configure distro language fonts
|
||||||
|
include_tasks: "{{ ansible_distribution|lower }}_fonts.yml"
|
||||||
|
|||||||
15
roles/confluence_config/tasks/ubuntu_fonts.yml
Normal file
15
roles/confluence_config/tasks/ubuntu_fonts.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Install Google Noto fonts for language coverage
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- "fonts-noto"
|
||||||
|
|
||||||
|
- name: Link the language fonts into the JDK/JRE
|
||||||
|
# Not idiomatic, but cleaner that messing with nested lookups...
|
||||||
|
shell:
|
||||||
|
cmd: "ln -sf /usr/share/fonts/truetype/noto/* {{ item }}/"
|
||||||
|
creates: "{{ item }}/NotoSansJavanese-Regular.ttf"
|
||||||
|
warn: false
|
||||||
|
with_items: "{{ atl_fonts_fallback_dirs }}"
|
||||||
|
changed_when: false # For Molecule idempotence check
|
||||||
Reference in New Issue
Block a user