Skip to content

Commit

Permalink
Force composer update on mediawiki files to update submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Brooks authored Dec 9, 2024
1 parent 1daa502 commit 2625106
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/roles/mediawiki/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,36 @@

- name: Verify metastore index upgraded
shell: WIKI={{ list_of_wikis[0] }} php {{ m_mediawiki }}/extensions/CirrusSearch/maintenance/Metastore.php --upgrade
register: metastore_upgrade_result
run_once: true
when: docker_skip_tasks is not defined or not docker_skip_tasks

# Run these tasks if the task above fails
# There's probably a better way to do this
- name: Remove vendor directory - Run if metastore index upgrade fails
shell: "rm -rf {{ m_mediawiki }}/vendor"
run_once: true
when: metastore_upgrade_result.failed

- name: Remove composer.lock - Run if metastore index upgrade fails
shell: "rm {{ m_mediawiki }}/composer.lock"
run_once: true
when: metastore_upgrade_result.failed

- name: Run composer update - Run if metastore index upgrade fails
become: yes
become_user: "meza-ansible"
composer:
command: update
working_dir: "{{ m_mediawiki }}"
no_dev: yes
when: metastore_upgrade_result.failed

- name: Retry - Verify metastore index upgraded
shell: WIKI={{ list_of_wikis[0] }} php {{ m_mediawiki }}/extensions/CirrusSearch/maintenance/Metastore.php --upgrade
run_once: true
when: metastore_upgrade_result.failed

# Wikis are totally built at this point, but search needs rebuilding
# FIXME #811: Will this work when controller is not an app server?
- name: "(Re-)build search index for: {{ wikis_to_rebuild_data | join(', ') }}"
Expand Down

0 comments on commit 2625106

Please sign in to comment.