Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WAZO-3986 - Pull request for postgresql-15 #258

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions wazo_acceptance/assets/wazo-service-test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright 2016-2024 The Wazo Authors (see the AUTHORS file)
# Copyright 2016-2025 The Wazo Authors (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0-or-later

import re
Expand Down Expand Up @@ -27,7 +27,7 @@
'wazo-sysconfd',
]

ALL_SERVICES = ['rabbitmq-server', 'postgresql@13-main', 'nginx'] + BASE_SERVICES
ALL_SERVICES = ['rabbitmq-server', 'postgresql@15-main', 'nginx'] + BASE_SERVICES

MONIT_RUNNING = re.compile(r'^\d+ monit$')
RUNNING_SERVICE = re.compile(r'^\s+(?:running|unknown)\s+(\S+)$')
Expand Down
6 changes: 3 additions & 3 deletions wazo_acceptance/prerequisite.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2013-2024 The Wazo Authors (see the AUTHORS file)
# Copyright 2013-2025 The Wazo Authors (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0-or-later

import logging
Expand Down Expand Up @@ -291,15 +291,15 @@ def _configure_asterisk(context):


def _configure_postgresql_debug(context):
config_file = '/etc/postgresql/13/main/postgresql.conf'
config_file = '/etc/postgresql/15/main/postgresql.conf'
command = [
'sed',
'-i',
'"s/#log_min_duration_statement = -1/log_min_duration_statement = 0/"',
config_file,
]
context.ssh_client.check_call(command)
pg_is_running = context.remote_sysutils.is_process_running('postgresql@13-main')
pg_is_running = context.remote_sysutils.is_process_running('postgresql@15-main')
if pg_is_running:
context.remote_sysutils.reload_service('postgresql')

Expand Down
25 changes: 25 additions & 0 deletions zuul.d/pre-run-pg15.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
- hosts: all
tasks:
- name: Install requirements
become: yes
apt:
name:
- curl
- ca-certificates
state: present
- name: step1
become: yes
ansible.builtin.shell: install -d /usr/share/postgresql-common/pgdg
- name: step2
become: yes
ansible.builtin.shell: curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
- name: step3
become: yes
ansible.builtin.shell: sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
- name: step4
become: yes
ansible.builtin.shell: apt update
- name: step5
become: yes
ansible.builtin.shell: apt -y install postgresql-15
7 changes: 6 additions & 1 deletion zuul.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
- job:
name: wazo-acceptance-bullseye-pg15
parent: wazo-acceptance-bullseye
pre-run: zuul.d/pre-run-pg15.yaml

- project:
templates:
- wazo-tox-linters-310
wazo-check:
jobs:
- wazo-acceptance-bullseye
- wazo-acceptance-bullseye-pg15
wazo-gate:
jobs:
- wazo-acceptance-bullseye
Expand Down