Merge "Add Gerrit 3.6 -> 3.7 upgrade test job"

This commit is contained in:
Zuul 2023-02-01 21:46:08 +00:00 committed by Gerrit Code Review
commit aa32d4d9d3
5 changed files with 34 additions and 29 deletions

View File

@ -5,6 +5,7 @@ gerrit_site_dir: "{{ gerrit_home_dir }}/review_site"
gerrit_run_compose_up: false gerrit_run_compose_up: false
gerrit_run_init: false gerrit_run_init: false
gerrit_run_init_dev_mode: false gerrit_run_init_dev_mode: false
gerrit_run_reindex: false
gerrit_packed_git_open_files: 4096 gerrit_packed_git_open_files: 4096
gerrit_container_image: docker.io/opendevorg/gerrit:3.6 gerrit_container_image: docker.io/opendevorg/gerrit:3.6
gerrit_container_volumes: gerrit_container_volumes:

View File

@ -6,6 +6,14 @@
chdir: /etc/gerrit-compose/ chdir: /etc/gerrit-compose/
when: gerrit_run_init | bool when: gerrit_run_init | bool
- name: Run gerrit reindex
shell:
cmd: >
docker-compose run shell
java -jar /var/gerrit/bin/gerrit.war reindex -d /var/gerrit
chdir: /etc/gerrit-compose/
when: gerrit_run_reindex | bool
- name: Run docker-compose up - name: Run docker-compose up
shell: shell:
cmd: docker-compose up -d cmd: docker-compose up -d

View File

@ -7,7 +7,7 @@
- name: Ensure initial gerrit state - name: Ensure initial gerrit state
import_playbook: ../service-review.yaml import_playbook: ../service-review.yaml
vars: vars:
gerrit_container_image: docker.io/opendevorg/gerrit:3.5 gerrit_container_image: docker.io/opendevorg/gerrit:3.6
- hosts: "review:!disabled" - hosts: "review:!disabled"
name: "Wait for gerrit to be up and running" name: "Wait for gerrit to be up and running"
@ -23,12 +23,6 @@
- hosts: "review:!disabled" - hosts: "review:!disabled"
name: "Prepare Gerrit for Upgrade" name: "Prepare Gerrit for Upgrade"
tasks: tasks:
- name: Run gerrit sticky approvals migration command
shell:
cmd: |
ssh -i /root/.ssh/id_25519 -p 29418 admin@localhost \
gerrit copy-approvals -v
- name: Stop gerrit before we upgrade - name: Stop gerrit before we upgrade
shell: shell:
cmd: docker-compose down cmd: docker-compose down
@ -62,8 +56,10 @@
- name: Perform gerrit upgrade - name: Perform gerrit upgrade
import_playbook: ../service-review.yaml import_playbook: ../service-review.yaml
vars: vars:
gerrit_container_image: docker.io/opendevorg/gerrit:3.6 gerrit_container_image: docker.io/opendevorg/gerrit:3.7
gerrit_run_init: true gerrit_run_init: true
# Gerrit 3.6 -> 3.7 upgrade requires an offline reindex
gerrit_run_reindex: true
- hosts: "review:!disabled" - hosts: "review:!disabled"
name: "Post upgrade config check" name: "Post upgrade config check"

View File

@ -75,13 +75,13 @@
- name: opendev-buildset-registry - name: opendev-buildset-registry
- name: system-config-build-image-gerrit-3.7 - name: system-config-build-image-gerrit-3.7
soft: true soft: true
#- system-config-upgrade-review: - system-config-upgrade-review:
# dependencies: dependencies:
# - name: opendev-buildset-registry - name: opendev-buildset-registry
# - name: system-config-build-image-gerrit-3.6 - name: system-config-build-image-gerrit-3.6
# soft: true soft: true
# - name: system-config-build-image-gerrit-3.7 - name: system-config-build-image-gerrit-3.7
# soft: true soft: true
- system-config-build-image-refstack - system-config-build-image-refstack
- system-config-run-refstack: - system-config-run-refstack:
dependencies: dependencies:

View File

@ -1127,20 +1127,20 @@
vars: vars:
zuul_test_gerrit_version: '3.7' zuul_test_gerrit_version: '3.7'
#- job: - job:
# name: system-config-upgrade-review name: system-config-upgrade-review
# parent: system-config-run-review-base parent: system-config-run-review-base
# description: | description: |
# Test we can upgrade a gerrit 3.6 to 3.7 Test we can upgrade a gerrit 3.6 to 3.7
# requires: requires:
# - gerrit-3.6-container-image - gerrit-3.6-container-image
# - gerrit-3.7-container-image - gerrit-3.7-container-image
# vars: vars:
# run_playbooks: run_playbooks:
# - playbooks/letsencrypt.yaml - playbooks/letsencrypt.yaml
# - playbooks/zuul/upgrade-review.yaml - playbooks/zuul/upgrade-review.yaml
# run_test_playbook: playbooks/zuul/test-review.yaml run_test_playbook: playbooks/zuul/test-review.yaml
# zuul_test_gerrit_version: '3.6' zuul_test_gerrit_version: '3.6'
- job: - job:
name: system-config-run-static name: system-config-run-static