Merge "gerrit: diff config files on upgrade"
This commit is contained in:
commit
0d476f0479
@ -15,8 +15,38 @@
|
||||
cmd: docker-compose down
|
||||
chdir: /etc/gerrit-compose/
|
||||
|
||||
- name: Backup config files
|
||||
block:
|
||||
- name: Find .config files
|
||||
find:
|
||||
paths: /home/gerrit2/review_site/etc
|
||||
patterns: '*.config'
|
||||
register: _config_files
|
||||
|
||||
- name: 'Backup config file'
|
||||
copy:
|
||||
src: '{{ item }}'
|
||||
dest: '{{ item }}.pre-upgrade'
|
||||
remote_src: true
|
||||
loop: "{{ _config_files.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: Perform gerrit upgrade
|
||||
import_playbook: ../service-review.yaml
|
||||
vars:
|
||||
gerrit_container_image: docker.io/opendevorg/gerrit:3.3
|
||||
gerrit_run_init: true
|
||||
|
||||
- hosts: "review:!disabled"
|
||||
name: "Post upgrade config check"
|
||||
tasks:
|
||||
- name: Diff config files
|
||||
shell: |
|
||||
diff -u {{ item }}.pre-upgrade {{ item }} | tee {{ item }}.diff
|
||||
loop: "{{ _config_files.files | map(attribute='path') | list }}"
|
||||
register: _diff_output
|
||||
|
||||
- name: Check diffs
|
||||
fail:
|
||||
msg: 'Difference detected in file {{ item.item }} '
|
||||
when: item.rc != 0
|
||||
loop: '{{ _diff_output.results }}'
|
||||
|
@ -886,6 +886,7 @@
|
||||
- roles/bazelisk-build/
|
||||
- testinfra/test_gerrit.py
|
||||
- docker/gerrit/
|
||||
- playbooks/zuul/upgrade-review.yaml
|
||||
|
||||
- job:
|
||||
name: system-config-run-review-3.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user