Skip to content

Commit 18d3df4

Browse files
authored
Merge pull request #315 from myii/feat/update-all-platforms-for-postgresql-13-inc-CI
feat: update all platforms for PostgreSQL 13 (inc. `use_upstream_repo` in CI)
2 parents 1fa7c66 + a1837c2 commit 18d3df4

File tree

18 files changed

+405
-84
lines changed

18 files changed

+405
-84
lines changed

.github/workflows/kitchen.vagrant.yml

+3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ jobs:
1515
matrix:
1616
instance:
1717
- default-freebsd-130-master-py3
18+
# - freebsd-130-master-py3
1819
- default-freebsd-122-master-py3
20+
# - freebsd-122-master-py3
1921
- default-freebsd-114-master-py3
22+
# - freebsd-114-master-py3
2023
# - default-freebsd-130-3002-6-py3
2124
# - default-freebsd-122-3002-6-py3
2225
# - default-freebsd-114-3002-6-py3

.gitlab-ci.yml

+60-17
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ rubocop:
102102
###############################################################################
103103
# Define `test` template
104104
###############################################################################
105-
.test_instance:
105+
.test_instance: &test_instance
106106
stage: *stage_test
107107
image: *image_dindruby
108108
services: *services_docker_dind
@@ -117,6 +117,13 @@ rubocop:
117117
# Alternative value to consider: `${CI_JOB_NAME}`
118118
- 'bin/kitchen verify "${DOCKER_ENV_CI_JOB_NAME}"'
119119

120+
###############################################################################
121+
# Define `test` template (`allow_failure: true`)
122+
###############################################################################
123+
.test_instance_failure_permitted:
124+
<<: *test_instance
125+
allow_failure: true
126+
120127
###############################################################################
121128
# `test` stage: each instance below uses the `test` template above
122129
###############################################################################
@@ -135,26 +142,62 @@ rubocop:
135142
# default-oraclelinux-7-tiamat-py3: {extends: '.test_instance'}
136143
# default-almalinux-8-tiamat-py3: {extends: '.test_instance'}
137144
# default-rockylinux-8-tiamat-py3: {extends: '.test_instance'}
138-
default-debian-11-master-py3: {extends: '.test_instance'}
139-
default-debian-10-master-py3: {extends: '.test_instance'}
140-
default-debian-9-master-py3: {extends: '.test_instance'}
141-
default-ubuntu-2004-master-py3: {extends: '.test_instance'}
142-
default-ubuntu-1804-master-py3: {extends: '.test_instance'}
143-
default-centos-8-master-py3: {extends: '.test_instance'}
144-
default-centos-7-master-py3: {extends: '.test_instance'}
145-
default-fedora-34-master-py3: {extends: '.test_instance'}
146-
default-fedora-33-master-py3: {extends: '.test_instance'}
147-
default-opensuse-leap-153-master-py3: {extends: '.test_instance'}
148-
default-opensuse-leap-152-master-py3: {extends: '.test_instance'}
145+
# default-debian-11-master-py3: {extends: '.test_instance'}
146+
# repo-debian-11-master-py3: {extends: '.test_instance'}
147+
debian-11-master-py3: {extends: '.test_instance'}
148+
# default-debian-10-master-py3: {extends: '.test_instance'}
149+
# repo-debian-10-master-py3: {extends: '.test_instance'}
150+
debian-10-master-py3: {extends: '.test_instance'}
151+
# default-debian-9-master-py3: {extends: '.test_instance'}
152+
# repo-debian-9-master-py3: {extends: '.test_instance'}
153+
debian-9-master-py3: {extends: '.test_instance'}
154+
# default-ubuntu-2004-master-py3: {extends: '.test_instance'}
155+
# repo-ubuntu-2004-master-py3: {extends: '.test_instance'}
156+
ubuntu-2004-master-py3: {extends: '.test_instance'}
157+
# default-ubuntu-1804-master-py3: {extends: '.test_instance'}
158+
# repo-ubuntu-1804-master-py3: {extends: '.test_instance'}
159+
ubuntu-1804-master-py3: {extends: '.test_instance'}
160+
# default-centos-8-master-py3: {extends: '.test_instance'}
161+
# repo-centos-8-master-py3: {extends: '.test_instance'}
162+
centos-8-master-py3: {extends: '.test_instance'}
163+
# default-centos-7-master-py3: {extends: '.test_instance'}
164+
# repo-centos-7-master-py3: {extends: '.test_instance'}
165+
centos-7-master-py3: {extends: '.test_instance'}
166+
# default-fedora-34-master-py3: {extends: '.test_instance'}
167+
# repo-fedora-34-master-py3: {extends: '.test_instance'}
168+
fedora-34-master-py3: {extends: '.test_instance'}
169+
# default-fedora-33-master-py3: {extends: '.test_instance'}
170+
# repo-fedora-33-master-py3: {extends: '.test_instance'}
171+
fedora-33-master-py3: {extends: '.test_instance'}
172+
# default-opensuse-leap-153-master-py3: {extends: '.test_instance'}
173+
# repo-opensuse-leap-153-master-py3: {extends: '.test_instance'}
174+
opensuse-leap-153-master-py3: {extends: '.test_instance'}
175+
# default-opensuse-leap-152-master-py3: {extends: '.test_instance'}
176+
# repo-opensuse-leap-152-master-py3: {extends: '.test_instance_failure_permitted'}
177+
opensuse-leap-152-master-py3: {extends: '.test_instance_failure_permitted'}
149178
default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance'}
150-
default-amazonlinux-2-master-py3: {extends: '.test_instance'}
151-
default-oraclelinux-8-master-py3: {extends: '.test_instance'}
152-
default-oraclelinux-7-master-py3: {extends: '.test_instance'}
179+
# opensuse-tmbl-latest-master-py3: {extends: '.test_instance'}
180+
# default-amazonlinux-2-master-py3: {extends: '.test_instance'}
181+
# repo-amazonlinux-2-master-py3: {extends: '.test_instance'}
182+
amazonlinux-2-master-py3: {extends: '.test_instance'}
183+
# default-oraclelinux-8-master-py3: {extends: '.test_instance'}
184+
# repo-oraclelinux-8-master-py3: {extends: '.test_instance'}
185+
oraclelinux-8-master-py3: {extends: '.test_instance'}
186+
# default-oraclelinux-7-master-py3: {extends: '.test_instance'}
187+
# repo-oraclelinux-7-master-py3: {extends: '.test_instance'}
188+
oraclelinux-7-master-py3: {extends: '.test_instance'}
153189
default-arch-base-latest-master-py3: {extends: '.test_instance'}
190+
# arch-base-latest-master-py3: {extends: '.test_instance'}
154191
# default-gentoo-stage3-latest-master-py3: {extends: '.test_instance'}
192+
# gentoo-stage3-latest-master-py3: {extends: '.test_instance'}
155193
# default-gentoo-stage3-systemd-master-py3: {extends: '.test_instance'}
156-
default-almalinux-8-master-py3: {extends: '.test_instance'}
157-
default-rockylinux-8-master-py3: {extends: '.test_instance'}
194+
# gentoo-stage3-systemd-master-py3: {extends: '.test_instance'}
195+
# default-almalinux-8-master-py3: {extends: '.test_instance'}
196+
# repo-almalinux-8-master-py3: {extends: '.test_instance'}
197+
almalinux-8-master-py3: {extends: '.test_instance'}
198+
# default-rockylinux-8-master-py3: {extends: '.test_instance'}
199+
# repo-rockylinux-8-master-py3: {extends: '.test_instance'}
200+
rockylinux-8-master-py3: {extends: '.test_instance'}
158201
# default-debian-11-3003-1-py3: {extends: '.test_instance'}
159202
# default-debian-10-3003-1-py3: {extends: '.test_instance'}
160203
# default-debian-9-3003-1-py3: {extends: '.test_instance'}

.travis.yml

+52-16
Original file line numberDiff line numberDiff line change
@@ -95,26 +95,62 @@ jobs:
9595
# - env: INSTANCE=default-oraclelinux-7-tiamat-py3
9696
# - env: INSTANCE=default-almalinux-8-tiamat-py3
9797
# - env: INSTANCE=default-rockylinux-8-tiamat-py3
98-
- env: INSTANCE=default-debian-11-master-py3
99-
- env: INSTANCE=default-debian-10-master-py3
100-
- env: INSTANCE=default-debian-9-master-py3
101-
- env: INSTANCE=default-ubuntu-2004-master-py3
102-
- env: INSTANCE=default-ubuntu-1804-master-py3
103-
- env: INSTANCE=default-centos-8-master-py3
104-
- env: INSTANCE=default-centos-7-master-py3
105-
- env: INSTANCE=default-fedora-34-master-py3
106-
- env: INSTANCE=default-fedora-33-master-py3
107-
- env: INSTANCE=default-opensuse-leap-153-master-py3
108-
- env: INSTANCE=default-opensuse-leap-152-master-py3
98+
# - env: INSTANCE=default-debian-11-master-py3
99+
# - env: INSTANCE=repo-debian-11-master-py3
100+
- env: INSTANCE=debian-11-master-py3
101+
# - env: INSTANCE=default-debian-10-master-py3
102+
# - env: INSTANCE=repo-debian-10-master-py3
103+
- env: INSTANCE=debian-10-master-py3
104+
# - env: INSTANCE=default-debian-9-master-py3
105+
# - env: INSTANCE=repo-debian-9-master-py3
106+
- env: INSTANCE=debian-9-master-py3
107+
# - env: INSTANCE=default-ubuntu-2004-master-py3
108+
# - env: INSTANCE=repo-ubuntu-2004-master-py3
109+
- env: INSTANCE=ubuntu-2004-master-py3
110+
# - env: INSTANCE=default-ubuntu-1804-master-py3
111+
# - env: INSTANCE=repo-ubuntu-1804-master-py3
112+
- env: INSTANCE=ubuntu-1804-master-py3
113+
# - env: INSTANCE=default-centos-8-master-py3
114+
# - env: INSTANCE=repo-centos-8-master-py3
115+
- env: INSTANCE=centos-8-master-py3
116+
# - env: INSTANCE=default-centos-7-master-py3
117+
# - env: INSTANCE=repo-centos-7-master-py3
118+
- env: INSTANCE=centos-7-master-py3
119+
# - env: INSTANCE=default-fedora-34-master-py3
120+
# - env: INSTANCE=repo-fedora-34-master-py3
121+
- env: INSTANCE=fedora-34-master-py3
122+
# - env: INSTANCE=default-fedora-33-master-py3
123+
# - env: INSTANCE=repo-fedora-33-master-py3
124+
- env: INSTANCE=fedora-33-master-py3
125+
# - env: INSTANCE=default-opensuse-leap-153-master-py3
126+
# - env: INSTANCE=repo-opensuse-leap-153-master-py3
127+
- env: INSTANCE=opensuse-leap-153-master-py3
128+
# - env: INSTANCE=default-opensuse-leap-152-master-py3
129+
# - env: INSTANCE=repo-opensuse-leap-152-master-py3
130+
- env: INSTANCE=opensuse-leap-152-master-py3
109131
- env: INSTANCE=default-opensuse-tmbl-latest-master-py3
110-
- env: INSTANCE=default-amazonlinux-2-master-py3
111-
- env: INSTANCE=default-oraclelinux-8-master-py3
112-
- env: INSTANCE=default-oraclelinux-7-master-py3
132+
# - env: INSTANCE=opensuse-tmbl-latest-master-py3
133+
# - env: INSTANCE=default-amazonlinux-2-master-py3
134+
# - env: INSTANCE=repo-amazonlinux-2-master-py3
135+
- env: INSTANCE=amazonlinux-2-master-py3
136+
# - env: INSTANCE=default-oraclelinux-8-master-py3
137+
# - env: INSTANCE=repo-oraclelinux-8-master-py3
138+
- env: INSTANCE=oraclelinux-8-master-py3
139+
# - env: INSTANCE=default-oraclelinux-7-master-py3
140+
# - env: INSTANCE=repo-oraclelinux-7-master-py3
141+
- env: INSTANCE=oraclelinux-7-master-py3
113142
- env: INSTANCE=default-arch-base-latest-master-py3
143+
# - env: INSTANCE=arch-base-latest-master-py3
114144
# - env: INSTANCE=default-gentoo-stage3-latest-master-py3
145+
# - env: INSTANCE=gentoo-stage3-latest-master-py3
115146
# - env: INSTANCE=default-gentoo-stage3-systemd-master-py3
116-
- env: INSTANCE=default-almalinux-8-master-py3
117-
- env: INSTANCE=default-rockylinux-8-master-py3
147+
# - env: INSTANCE=gentoo-stage3-systemd-master-py3
148+
# - env: INSTANCE=default-almalinux-8-master-py3
149+
# - env: INSTANCE=repo-almalinux-8-master-py3
150+
- env: INSTANCE=almalinux-8-master-py3
151+
# - env: INSTANCE=default-rockylinux-8-master-py3
152+
# - env: INSTANCE=repo-rockylinux-8-master-py3
153+
- env: INSTANCE=rockylinux-8-master-py3
118154
# - env: INSTANCE=default-debian-11-3003-1-py3
119155
# - env: INSTANCE=default-debian-10-3003-1-py3
120156
# - env: INSTANCE=default-debian-9-3003-1-py3

kitchen.yml

+100
Original file line numberDiff line numberDiff line change
@@ -445,3 +445,103 @@ suites:
445445
verifier:
446446
inspec_tests:
447447
- path: test/integration/default
448+
- name: repo
449+
includes:
450+
- debian-11-tiamat-py3
451+
- debian-10-tiamat-py3
452+
- debian-9-tiamat-py3
453+
- ubuntu-2004-tiamat-py3
454+
- ubuntu-1804-tiamat-py3
455+
- centos-8-tiamat-py3
456+
- centos-7-tiamat-py3
457+
- amazonlinux-2-tiamat-py3
458+
- oraclelinux-8-tiamat-py3
459+
- oraclelinux-7-tiamat-py3
460+
- almalinux-8-tiamat-py3
461+
- rockylinux-8-tiamat-py3
462+
- debian-11-master-py3
463+
- debian-10-master-py3
464+
- debian-9-master-py3
465+
- ubuntu-2004-master-py3
466+
- ubuntu-1804-master-py3
467+
- centos-8-master-py3
468+
- centos-7-master-py3
469+
- fedora-34-master-py3
470+
- fedora-33-master-py3
471+
- opensuse-leap-153-master-py3
472+
- opensuse-leap-152-master-py3
473+
- amazonlinux-2-master-py3
474+
- oraclelinux-8-master-py3
475+
- oraclelinux-7-master-py3
476+
- almalinux-8-master-py3
477+
- rockylinux-8-master-py3
478+
- debian-11-3003-1-py3
479+
- debian-10-3003-1-py3
480+
- debian-9-3003-1-py3
481+
- ubuntu-2004-3003-1-py3
482+
- ubuntu-1804-3003-1-py3
483+
- centos-8-3003-1-py3
484+
- centos-7-3003-1-py3
485+
- fedora-34-3003-1-py3
486+
- fedora-33-3003-1-py3
487+
- opensuse-leap-153-3003-1-py3
488+
- opensuse-leap-152-3003-1-py3
489+
- amazonlinux-2-3003-1-py3
490+
- oraclelinux-8-3003-1-py3
491+
- oraclelinux-7-3003-1-py3
492+
- debian-11-3002-6-py3
493+
- debian-10-3002-6-py3
494+
- debian-9-3002-6-py3
495+
- ubuntu-2004-3002-6-py3
496+
- ubuntu-1804-3002-6-py3
497+
- centos-8-3002-6-py3
498+
- centos-7-3002-6-py3
499+
- fedora-34-3002-6-py3
500+
- fedora-33-3002-6-py3
501+
- amazonlinux-2-3002-6-py3
502+
- oraclelinux-8-3002-6-py3
503+
- oraclelinux-7-3002-6-py3
504+
- opensuse-leap-153-3002-2-py3
505+
- opensuse-leap-152-3002-2-py3
506+
- debian-10-3001-7-py3
507+
- debian-9-3001-7-py3
508+
- ubuntu-2004-3001-7-py3
509+
- ubuntu-1804-3001-7-py3
510+
- centos-8-3001-7-py3
511+
- centos-7-3001-7-py3
512+
- fedora-34-3001-7-py3
513+
- fedora-33-3001-7-py3
514+
- opensuse-leap-153-3001-7-py3
515+
- opensuse-leap-152-3001-7-py3
516+
- amazonlinux-2-3001-7-py3
517+
- oraclelinux-8-3001-7-py3
518+
- oraclelinux-7-3001-7-py3
519+
- debian-10-3000-9-py3
520+
- debian-9-3000-9-py3
521+
- ubuntu-1804-3000-9-py3
522+
- centos-8-3000-9-py3
523+
- centos-7-3000-9-py3
524+
- opensuse-leap-153-3000-9-py3
525+
- opensuse-leap-152-3000-9-py3
526+
- amazonlinux-2-3000-9-py3
527+
- oraclelinux-8-3000-9-py3
528+
- oraclelinux-7-3000-9-py3
529+
- ubuntu-1804-3000-9-py2
530+
provisioner:
531+
state_top:
532+
base:
533+
'*':
534+
- postgres._mapdata
535+
- postgres
536+
pillars:
537+
top.sls:
538+
base:
539+
'*':
540+
- postgres
541+
- repo
542+
pillars_from_files:
543+
postgres.sls: test/salt/pillar/postgres.sls
544+
repo.sls: test/salt/pillar/repo.sls
545+
verifier:
546+
inspec_tests:
547+
- path: test/integration/repo

postgres/codenamemap.yaml

+11-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,17 @@
7878
{{ debian_codename('focal', '12') }}
7979

8080
## Fedora
81-
# http://apt.postgresql.org/pub/repos/yum/reporpms/
81+
# https://download.postgresql.org/pub/repos/yum/13/fedora/
8282
# https://apps.fedoraproject.org/packages/postgresql
83-
# `oscodename` grain has long distro name
84-
{{ fedora_codename('Fedora-31', '11', 'Fedora 31 (Thirty One)') }}
85-
{{ fedora_codename('Fedora-30', '11', 'Fedora 30 (Thirty)') }}
83+
{{ fedora_codename('Fedora-34', '13') }}
84+
{{ fedora_codename('Fedora-33', '13') }}
85+
86+
## Amazon
87+
Amazon Linux 2:
88+
pkgs_deps:
89+
- libicu
90+
- systemd-sysv
91+
pkg_repo:
92+
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/redhat/rhel-7-$basearch'
8693

8794
# vim: ft=sls

postgres/osfamilymap.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,12 @@ RedHat:
6363
gpgkey: 'https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-{{ release }}'
6464
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/redhat/rhel-$releasever-$basearch'
6565

66-
{%- if grains.get('osmajorrelease', 0) >= 7 %}
6766
pkgs_deps:
6867
- libicu
68+
{%- if grains.get('osmajorrelease', 0) == 7 %}
69+
- systemd-sysv
70+
{%- endif %}
6971
pkg_python: python3-psycopg2
70-
{%- endif %}
7172

7273
{% if repo.use_upstream_repo == true %}
7374
{% set data_dir = '/var/lib/pgsql/' ~ repo.version ~ '/data' %}

postgres/osmap.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,3 @@ Fedora:
99
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/fedora/fedora-$releasever-$basearch'
1010
remove:
1111
releases: ['9.4', '9.5', '9.6', '10']
12-
13-
Amazon:
14-
pkg_repo:
15-
baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/redhat/rhel-7-$basearch'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# frozen_string_literal: true
2+
3+
service_name = 'postgresql'
4+
5+
pg_port =
6+
case platform[:family]
7+
when 'debian', 'suse'
8+
5433
9+
else
10+
5432
11+
end
12+
13+
control 'Postgres service' do
14+
impact 0.5
15+
title 'should be installed, enabled and running'
16+
17+
describe service(service_name) do
18+
it { should be_installed }
19+
it { should be_enabled }
20+
it { should be_running }
21+
end
22+
23+
describe port(pg_port) do
24+
it { should be_listening }
25+
end
26+
end

test/integration/default/controls/services_spec.rb

-24
This file was deleted.

0 commit comments

Comments
 (0)