7 Commits

Author SHA1 Message Date
semantic-release-bot
01141d1116 chore(release): 0.41.7 [skip ci]
## [0.41.7](https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.6...v0.41.7) (2021-03-26)

### Continuous Integration

* enable Vagrant-based testing using GitHub Actions ([2ebc9c1](2ebc9c11da))
* **kitchen+ci:** use latest pre-salted images (after CVE) [skip ci] ([cc43d1c](cc43d1c90d))

### Documentation

* **readme:** add `Testing with Vagrant` section ([ed2d688](ed2d6884b1))

### Tests

* standardise use of `share` suite & `_mapdata` state [skip ci] ([fc53d97](fc53d977b3))
2021-03-26 16:44:28 +00:00
Imran Iqbal
0ee210c25f Merge pull request #310 from myii/ci/add-vagrant-testing-via-github-actions
ci: enable Vagrant-based testing using GitHub Actions
2021-03-26 16:35:51 +00:00
Imran Iqbal
ed2d6884b1 docs(readme): add Testing with Vagrant section 2021-03-26 14:59:24 +00:00
Imran Iqbal
2ebc9c11da ci: enable Vagrant-based testing using GitHub Actions
* Semi-automated using https://github.com/myii/ssf-formula/pull/304
2021-03-26 11:26:19 +00:00
Imran Iqbal
fc53d977b3 test: standardise use of share suite & _mapdata state [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/302
2021-03-23 21:31:59 +00:00
Imran Iqbal
cc43d1c90d ci(kitchen+ci): use latest pre-salted images (after CVE) [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/299
2021-03-07 22:21:34 +00:00
Imran Iqbal
23b1f18dba chore(yamllint): add .git/ to ignores [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/297
2021-03-05 18:34:31 +00:00
20 changed files with 550 additions and 229 deletions

34
.github/workflows/kitchen.vagrant.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: 'Kitchen Vagrant (FreeBSD)'
'on': ['push', 'pull_request']
env:
KITCHEN_LOCAL_YAML: 'kitchen.vagrant.yml'
jobs:
test:
runs-on: 'macos-10.15'
strategy:
fail-fast: false
matrix:
instance:
- default-freebsd-122-latest-py3
- default-freebsd-114-latest-py3
steps:
- name: 'Check out code'
uses: 'actions/checkout@v2'
- name: 'Set up Bundler cache'
uses: 'actions/cache@v1'
with:
path: 'vendor/bundle'
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
restore-keys: "${{ runner.os }}-gems-"
- name: 'Run Bundler'
run: |
ruby --version
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: 'Run Test Kitchen'
run: 'bundle exec kitchen verify ${{ matrix.instance }}'

View File

@@ -46,7 +46,7 @@ variables:
DOCKER_DRIVER: 'overlay2'
###############################################################################
# `lint` stage: `commitlint` & `pre-commit`
# `lint` stage: `commitlint`, `pre-commit` & `rubocop` (latest, failure allowed)
###############################################################################
commitlint:
stage: *stage_lint
@@ -149,55 +149,55 @@ default-oraclelinux-8-master-py3: {extends: '.test_instance'}
default-oraclelinux-7-master-py3: {extends: '.test_instance'}
# default-gentoo-stage3-latest-master-py3: {extends: '.test_instance'}
# default-gentoo-stage3-systemd-master-py3: {extends: '.test_instance'}
# default-debian-10-3002-2-py3: {extends: '.test_instance'}
# default-debian-9-3002-2-py3: {extends: '.test_instance'}
# default-ubuntu-2004-3002-2-py3: {extends: '.test_instance'}
# default-ubuntu-1804-3002-2-py3: {extends: '.test_instance'}
# default-ubuntu-1604-3002-2-py3: {extends: '.test_instance'}
# default-centos-8-3002-2-py3: {extends: '.test_instance'}
# default-centos-7-3002-2-py3: {extends: '.test_instance'}
# default-fedora-33-3002-2-py3: {extends: '.test_instance'}
# default-fedora-32-3002-2-py3: {extends: '.test_instance'}
# default-debian-10-3002-5-py3: {extends: '.test_instance'}
# default-debian-9-3002-5-py3: {extends: '.test_instance'}
# default-ubuntu-2004-3002-5-py3: {extends: '.test_instance'}
# default-ubuntu-1804-3002-5-py3: {extends: '.test_instance'}
# default-ubuntu-1604-3002-5-py3: {extends: '.test_instance'}
# default-centos-8-3002-5-py3: {extends: '.test_instance'}
# default-centos-7-3002-5-py3: {extends: '.test_instance'}
# default-fedora-33-3002-5-py3: {extends: '.test_instance'}
# default-fedora-32-3002-5-py3: {extends: '.test_instance'}
# default-amazonlinux-2-3002-5-py3: {extends: '.test_instance'}
# default-oraclelinux-8-3002-5-py3: {extends: '.test_instance'}
# default-oraclelinux-7-3002-5-py3: {extends: '.test_instance'}
default-arch-base-latest-3002-5-py3: {extends: '.test_instance'}
# default-gentoo-stage3-latest-3002-5-py3: {extends: '.test_instance'}
# default-gentoo-stage3-systemd-3002-5-py3: {extends: '.test_instance'}
# default-opensuse-leap-152-3002-2-py3: {extends: '.test_instance'}
# default-opensuse-tmbl-latest-3002-2-py3: {extends: '.test_instance'}
# default-amazonlinux-2-3002-2-py3: {extends: '.test_instance'}
# default-oraclelinux-8-3002-2-py3: {extends: '.test_instance'}
# default-oraclelinux-7-3002-2-py3: {extends: '.test_instance'}
default-arch-base-latest-3002-2-py3: {extends: '.test_instance'}
# default-gentoo-stage3-latest-3002-2-py3: {extends: '.test_instance'}
# default-gentoo-stage3-systemd-3002-2-py3: {extends: '.test_instance'}
# default-debian-10-3001-4-py3: {extends: '.test_instance'}
# default-debian-9-3001-4-py3: {extends: '.test_instance'}
# default-ubuntu-2004-3001-4-py3: {extends: '.test_instance'}
# default-ubuntu-1804-3001-4-py3: {extends: '.test_instance'}
# default-ubuntu-1604-3001-4-py3: {extends: '.test_instance'}
# default-centos-8-3001-4-py3: {extends: '.test_instance'}
# default-centos-7-3001-4-py3: {extends: '.test_instance'}
# default-fedora-33-3001-4-py3: {extends: '.test_instance'}
# default-fedora-32-3001-4-py3: {extends: '.test_instance'}
# default-opensuse-leap-152-3001-4-py3: {extends: '.test_instance'}
# default-opensuse-tmbl-latest-3001-4-py3: {extends: '.test_instance'}
# default-amazonlinux-2-3001-4-py3: {extends: '.test_instance'}
# default-oraclelinux-8-3001-4-py3: {extends: '.test_instance'}
# default-oraclelinux-7-3001-4-py3: {extends: '.test_instance'}
# default-arch-base-latest-3001-4-py3: {extends: '.test_instance'}
# default-gentoo-stage3-latest-3001-4-py3: {extends: '.test_instance'}
# default-gentoo-stage3-systemd-3001-4-py3: {extends: '.test_instance'}
# default-debian-10-3000-6-py3: {extends: '.test_instance'}
# default-debian-9-3000-6-py3: {extends: '.test_instance'}
# default-ubuntu-1804-3000-6-py3: {extends: '.test_instance'}
# default-ubuntu-1604-3000-6-py3: {extends: '.test_instance'}
# default-centos-8-3000-6-py3: {extends: '.test_instance'}
# default-centos-7-3000-6-py3: {extends: '.test_instance'}
# default-opensuse-leap-152-3000-6-py3: {extends: '.test_instance'}
# default-amazonlinux-2-3000-6-py3: {extends: '.test_instance'}
# default-oraclelinux-8-3000-6-py3: {extends: '.test_instance'}
# default-oraclelinux-7-3000-6-py3: {extends: '.test_instance'}
# default-gentoo-stage3-latest-3000-6-py3: {extends: '.test_instance'}
# default-gentoo-stage3-systemd-3000-6-py3: {extends: '.test_instance'}
# default-ubuntu-1804-3000-6-py2: {extends: '.test_instance'}
# default-ubuntu-1604-3000-6-py2: {extends: '.test_instance'}
# default-arch-base-latest-3000-6-py2: {extends: '.test_instance'}
# default-debian-10-3001-6-py3: {extends: '.test_instance'}
# default-debian-9-3001-6-py3: {extends: '.test_instance'}
# default-ubuntu-2004-3001-6-py3: {extends: '.test_instance'}
# default-ubuntu-1804-3001-6-py3: {extends: '.test_instance'}
# default-ubuntu-1604-3001-6-py3: {extends: '.test_instance'}
# default-centos-8-3001-6-py3: {extends: '.test_instance'}
# default-centos-7-3001-6-py3: {extends: '.test_instance'}
# default-fedora-33-3001-6-py3: {extends: '.test_instance'}
# default-fedora-32-3001-6-py3: {extends: '.test_instance'}
# default-opensuse-leap-152-3001-6-py3: {extends: '.test_instance'}
# default-opensuse-tmbl-latest-3001-6-py3: {extends: '.test_instance'}
# default-amazonlinux-2-3001-6-py3: {extends: '.test_instance'}
# default-oraclelinux-8-3001-6-py3: {extends: '.test_instance'}
# default-oraclelinux-7-3001-6-py3: {extends: '.test_instance'}
# default-arch-base-latest-3001-6-py3: {extends: '.test_instance'}
# default-gentoo-stage3-latest-3001-6-py3: {extends: '.test_instance'}
# default-gentoo-stage3-systemd-3001-6-py3: {extends: '.test_instance'}
# default-debian-10-3000-8-py3: {extends: '.test_instance'}
# default-debian-9-3000-8-py3: {extends: '.test_instance'}
# default-ubuntu-1804-3000-8-py3: {extends: '.test_instance'}
# default-ubuntu-1604-3000-8-py3: {extends: '.test_instance'}
# default-centos-8-3000-8-py3: {extends: '.test_instance'}
# default-centos-7-3000-8-py3: {extends: '.test_instance'}
# default-opensuse-leap-152-3000-8-py3: {extends: '.test_instance'}
# default-amazonlinux-2-3000-8-py3: {extends: '.test_instance'}
# default-oraclelinux-8-3000-8-py3: {extends: '.test_instance'}
# default-oraclelinux-7-3000-8-py3: {extends: '.test_instance'}
# default-gentoo-stage3-latest-3000-8-py3: {extends: '.test_instance'}
# default-gentoo-stage3-systemd-3000-8-py3: {extends: '.test_instance'}
# default-ubuntu-1804-3000-8-py2: {extends: '.test_instance'}
# default-ubuntu-1604-3000-8-py2: {extends: '.test_instance'}
# default-arch-base-latest-3000-8-py2: {extends: '.test_instance'}
###############################################################################
# `release` stage: `semantic-release`

View File

@@ -7,7 +7,7 @@ Layout/LineLength:
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
Max: 88
Metrics/BlockLength:
ExcludedMethods:
IgnoredMethods:
- control
- describe
# Increase from default of `25`

View File

@@ -109,55 +109,55 @@ jobs:
- env: INSTANCE=default-oraclelinux-7-master-py3
# - env: INSTANCE=default-gentoo-stage3-latest-master-py3
# - env: INSTANCE=default-gentoo-stage3-systemd-master-py3
# - env: INSTANCE=default-debian-10-3002-2-py3
# - env: INSTANCE=default-debian-9-3002-2-py3
# - env: INSTANCE=default-ubuntu-2004-3002-2-py3
# - env: INSTANCE=default-ubuntu-1804-3002-2-py3
# - env: INSTANCE=default-ubuntu-1604-3002-2-py3
# - env: INSTANCE=default-centos-8-3002-2-py3
# - env: INSTANCE=default-centos-7-3002-2-py3
# - env: INSTANCE=default-fedora-33-3002-2-py3
# - env: INSTANCE=default-fedora-32-3002-2-py3
# - env: INSTANCE=default-debian-10-3002-5-py3
# - env: INSTANCE=default-debian-9-3002-5-py3
# - env: INSTANCE=default-ubuntu-2004-3002-5-py3
# - env: INSTANCE=default-ubuntu-1804-3002-5-py3
# - env: INSTANCE=default-ubuntu-1604-3002-5-py3
# - env: INSTANCE=default-centos-8-3002-5-py3
# - env: INSTANCE=default-centos-7-3002-5-py3
# - env: INSTANCE=default-fedora-33-3002-5-py3
# - env: INSTANCE=default-fedora-32-3002-5-py3
# - env: INSTANCE=default-amazonlinux-2-3002-5-py3
# - env: INSTANCE=default-oraclelinux-8-3002-5-py3
# - env: INSTANCE=default-oraclelinux-7-3002-5-py3
- env: INSTANCE=default-arch-base-latest-3002-5-py3
# - env: INSTANCE=default-gentoo-stage3-latest-3002-5-py3
# - env: INSTANCE=default-gentoo-stage3-systemd-3002-5-py3
# - env: INSTANCE=default-opensuse-leap-152-3002-2-py3
# - env: INSTANCE=default-opensuse-tmbl-latest-3002-2-py3
# - env: INSTANCE=default-amazonlinux-2-3002-2-py3
# - env: INSTANCE=default-oraclelinux-8-3002-2-py3
# - env: INSTANCE=default-oraclelinux-7-3002-2-py3
- env: INSTANCE=default-arch-base-latest-3002-2-py3
# - env: INSTANCE=default-gentoo-stage3-latest-3002-2-py3
# - env: INSTANCE=default-gentoo-stage3-systemd-3002-2-py3
# - env: INSTANCE=default-debian-10-3001-4-py3
# - env: INSTANCE=default-debian-9-3001-4-py3
# - env: INSTANCE=default-ubuntu-2004-3001-4-py3
# - env: INSTANCE=default-ubuntu-1804-3001-4-py3
# - env: INSTANCE=default-ubuntu-1604-3001-4-py3
# - env: INSTANCE=default-centos-8-3001-4-py3
# - env: INSTANCE=default-centos-7-3001-4-py3
# - env: INSTANCE=default-fedora-33-3001-4-py3
# - env: INSTANCE=default-fedora-32-3001-4-py3
# - env: INSTANCE=default-opensuse-leap-152-3001-4-py3
# - env: INSTANCE=default-opensuse-tmbl-latest-3001-4-py3
# - env: INSTANCE=default-amazonlinux-2-3001-4-py3
# - env: INSTANCE=default-oraclelinux-8-3001-4-py3
# - env: INSTANCE=default-oraclelinux-7-3001-4-py3
# - env: INSTANCE=default-arch-base-latest-3001-4-py3
# - env: INSTANCE=default-gentoo-stage3-latest-3001-4-py3
# - env: INSTANCE=default-gentoo-stage3-systemd-3001-4-py3
# - env: INSTANCE=default-debian-10-3000-6-py3
# - env: INSTANCE=default-debian-9-3000-6-py3
# - env: INSTANCE=default-ubuntu-1804-3000-6-py3
# - env: INSTANCE=default-ubuntu-1604-3000-6-py3
# - env: INSTANCE=default-centos-8-3000-6-py3
# - env: INSTANCE=default-centos-7-3000-6-py3
# - env: INSTANCE=default-opensuse-leap-152-3000-6-py3
# - env: INSTANCE=default-amazonlinux-2-3000-6-py3
# - env: INSTANCE=default-oraclelinux-8-3000-6-py3
# - env: INSTANCE=default-oraclelinux-7-3000-6-py3
# - env: INSTANCE=default-gentoo-stage3-latest-3000-6-py3
# - env: INSTANCE=default-gentoo-stage3-systemd-3000-6-py3
# - env: INSTANCE=default-ubuntu-1804-3000-6-py2
# - env: INSTANCE=default-ubuntu-1604-3000-6-py2
# - env: INSTANCE=default-arch-base-latest-3000-6-py2
# - env: INSTANCE=default-debian-10-3001-6-py3
# - env: INSTANCE=default-debian-9-3001-6-py3
# - env: INSTANCE=default-ubuntu-2004-3001-6-py3
# - env: INSTANCE=default-ubuntu-1804-3001-6-py3
# - env: INSTANCE=default-ubuntu-1604-3001-6-py3
# - env: INSTANCE=default-centos-8-3001-6-py3
# - env: INSTANCE=default-centos-7-3001-6-py3
# - env: INSTANCE=default-fedora-33-3001-6-py3
# - env: INSTANCE=default-fedora-32-3001-6-py3
# - env: INSTANCE=default-opensuse-leap-152-3001-6-py3
# - env: INSTANCE=default-opensuse-tmbl-latest-3001-6-py3
# - env: INSTANCE=default-amazonlinux-2-3001-6-py3
# - env: INSTANCE=default-oraclelinux-8-3001-6-py3
# - env: INSTANCE=default-oraclelinux-7-3001-6-py3
# - env: INSTANCE=default-arch-base-latest-3001-6-py3
# - env: INSTANCE=default-gentoo-stage3-latest-3001-6-py3
# - env: INSTANCE=default-gentoo-stage3-systemd-3001-6-py3
# - env: INSTANCE=default-debian-10-3000-8-py3
# - env: INSTANCE=default-debian-9-3000-8-py3
# - env: INSTANCE=default-ubuntu-1804-3000-8-py3
# - env: INSTANCE=default-ubuntu-1604-3000-8-py3
# - env: INSTANCE=default-centos-8-3000-8-py3
# - env: INSTANCE=default-centos-7-3000-8-py3
# - env: INSTANCE=default-opensuse-leap-152-3000-8-py3
# - env: INSTANCE=default-amazonlinux-2-3000-8-py3
# - env: INSTANCE=default-oraclelinux-8-3000-8-py3
# - env: INSTANCE=default-oraclelinux-7-3000-8-py3
# - env: INSTANCE=default-gentoo-stage3-latest-3000-8-py3
# - env: INSTANCE=default-gentoo-stage3-systemd-3000-8-py3
# - env: INSTANCE=default-ubuntu-1804-3000-8-py2
# - env: INSTANCE=default-ubuntu-1604-3000-8-py2
# - env: INSTANCE=default-arch-base-latest-3000-8-py2
## Define the release stage that runs `semantic-release`
- stage: 'release'

View File

@@ -2,15 +2,18 @@
# vim: ft=yaml
---
# Extend the `default` configuration provided by `yamllint`
extends: default
extends: 'default'
# Files to ignore completely
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
# 2. Any SLS files under directory `test/`, which are actually state files
# 3. Any YAML files under directory `.kitchen/`, introduced during local testing
# 4. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
# 1. All YAML files under directory `.cache/`, introduced during the GitLab CI run
# 2. All YAML files under directory `.git/`
# 3. All YAML files under directory `node_modules/`, introduced during the Travis run
# 4. Any SLS files under directory `test/`, which are actually state files
# 5. Any YAML files under directory `.kitchen/`, introduced during local testing
# 6. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
ignore: |
.cache/
.git/
node_modules/
test/**/states/**/*.sls
.kitchen/

View File

@@ -4,7 +4,7 @@ This list is sorted by the number of commits per contributor in _descending_ ord
Avatar|Contributor|Contributions
:-:|---|:-:
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>|[@myii](https://github.com/myii)|137
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>|[@myii](https://github.com/myii)|143
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/13322818?v=4' width='36' height='36' alt='@noelmcloughlin'>|[@noelmcloughlin](https://github.com/noelmcloughlin)|74
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/1800660?v=4' width='36' height='36' alt='@aboe76'>|[@aboe76](https://github.com/aboe76)|54
<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/1396878?v=4' width='36' height='36' alt='@gravyboat'>|[@gravyboat](https://github.com/gravyboat)|41
@@ -72,4 +72,4 @@ Avatar|Contributor|Contributions
---
Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2021-02-26.
Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2021-03-26.

View File

@@ -1,5 +1,23 @@
# Changelog
## [0.41.7](https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.6...v0.41.7) (2021-03-26)
### Continuous Integration
* enable Vagrant-based testing using GitHub Actions ([2ebc9c1](https://github.com/saltstack-formulas/postgres-formula/commit/2ebc9c11da512c8bc2089e8ecb28f5d3e13261f1))
* **kitchen+ci:** use latest pre-salted images (after CVE) [skip ci] ([cc43d1c](https://github.com/saltstack-formulas/postgres-formula/commit/cc43d1c90db36c232012bc80b66baa248ece3c42))
### Documentation
* **readme:** add `Testing with Vagrant` section ([ed2d688](https://github.com/saltstack-formulas/postgres-formula/commit/ed2d6884b10725fad55b83de4972e59710f1970f))
### Tests
* standardise use of `share` suite & `_mapdata` state [skip ci] ([fc53d97](https://github.com/saltstack-formulas/postgres-formula/commit/fc53d977b32290834dc5aa17fe461154b269d38c))
## [0.41.6](https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.5...v0.41.6) (2021-02-26)

View File

@@ -1,7 +1,7 @@
name: postgres
os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, Solaris, SmartOS, Windows, MacOS
os_family: Debian, RedHat, Suse, Gentoo, Arch, Alpine, FreeBSD, OpenBSD, Solaris, Windows, MacOS
version: 0.41.6
version: 0.41.7
release: 1
minimum_version: 2016.11
summary: Postgres formula

View File

@@ -5,7 +5,7 @@ source 'https://rubygems.org'
# Use the latest version of `inspec` prior to `4.23.4`, which introduces a
# regression where the diff isn't displayed when comparing using `eq`.
gem 'inspec', '~> 4.22.22'
# Install the `kitchen-docker` gem from GitHub because the latest version
# Install the `kitchen-docker` gem using `git` because the latest version
# currently available (`2.10.0`) doesn't include a recent fix for Gentoo.
# rubocop:disable Layout/LineLength
gem 'kitchen-docker', git: 'https://gitlab.com/saltstack-formulas/infrastructure/kitchen-docker', branch: 'ssf'

View File

@@ -15,7 +15,7 @@ This list is sorted by the number of commits per contributor in *descending* ord
- Contributions
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>`
- `@myii <https://github.com/myii>`_
- 137
- 143
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars.githubusercontent.com/u/13322818?v=4' width='36' height='36' alt='@noelmcloughlin'>`
- `@noelmcloughlin <https://github.com/noelmcloughlin>`_
- 74
@@ -212,4 +212,4 @@ This list is sorted by the number of commits per contributor in *descending* ord
----
Auto-generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2021-02-26.
Auto-generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2021-03-26.

View File

@@ -2,6 +2,28 @@
Changelog
=========
`0.41.7 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.6...v0.41.7>`_ (2021-03-26)
-------------------------------------------------------------------------------------------------------------
Continuous Integration
^^^^^^^^^^^^^^^^^^^^^^
* enable Vagrant-based testing using GitHub Actions (\ `2ebc9c1 <https://github.com/saltstack-formulas/postgres-formula/commit/2ebc9c11da512c8bc2089e8ecb28f5d3e13261f1>`_\ )
* **kitchen+ci:** use latest pre-salted images (after CVE) [skip ci] (\ `cc43d1c <https://github.com/saltstack-formulas/postgres-formula/commit/cc43d1c90db36c232012bc80b66baa248ece3c42>`_\ )
Documentation
^^^^^^^^^^^^^
* **readme:** add ``Testing with Vagrant`` section (\ `ed2d688 <https://github.com/saltstack-formulas/postgres-formula/commit/ed2d6884b10725fad55b83de4972e59710f1970f>`_\ )
Tests
^^^^^
* standardise use of ``share`` suite & ``_mapdata`` state [skip ci] (\ `fc53d97 <https://github.com/saltstack-formulas/postgres-formula/commit/fc53d977b32290834dc5aa17fe461154b269d38c>`_\ )
`0.41.6 <https://github.com/saltstack-formulas/postgres-formula/compare/v0.41.5...v0.41.6>`_ (2021-02-26)
-------------------------------------------------------------------------------------------------------------

View File

@@ -164,4 +164,66 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri
Gives you SSH access to the instance for manual testing.
Testing with Vagrant
--------------------
Windows/FreeBSD/OpenBSD testing is done with ``kitchen-salt``.
Requirements
^^^^^^^^^^^^
* Ruby
* Virtualbox
* Vagrant
Setup
^^^^^
.. code-block:: bash
$ gem install bundler
$ bundle install --with=vagrant
$ bin/kitchen test [platform]
Where ``[platform]`` is the platform name defined in ``kitchen.vagrant.yml``,
e.g. ``windows-81-latest-py3``.
Note
^^^^
When testing using Vagrant you must set the environment variable ``KITCHEN_LOCAL_YAML`` to ``kitchen.vagrant.yml``. For example:
.. code-block:: bash
$ KITCHEN_LOCAL_YAML=kitchen.vagrant.yml bin/kitchen test # Alternatively,
$ export KITCHEN_LOCAL_YAML=kitchen.vagrant.yml
$ bin/kitchen test
Then run the following commands as needed.
``bin/kitchen converge``
^^^^^^^^^^^^^^^^^^^^^^^^
Creates the Vagrant instance and runs the ``postgres`` main state, ready for testing.
``bin/kitchen verify``
^^^^^^^^^^^^^^^^^^^^^^
Runs the ``inspec`` tests on the actual instance.
``bin/kitchen destroy``
^^^^^^^^^^^^^^^^^^^^^^^
Removes the Vagrant instance.
``bin/kitchen test``
^^^^^^^^^^^^^^^^^^^^
Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
``bin/kitchen login``
^^^^^^^^^^^^^^^^^^^^^
Gives you RDP/SSH access to the instance for manual testing.
.. vim: fenc=utf-8 spell spl=en cc=100 tw=99 fo=want sts=2 sw=2 et

View File

@@ -3,15 +3,21 @@
---
driver:
name: vagrant
platforms:
- name: freebsd-120-2019-2-py3
driver:
box_url: https://freebsd.z.vstack.com/FreeBSD-12.0.box
cache_directory: false
customize:
usbxhci: 'off'
gui: false
linked_clone: true
ssh:
shell: '/bin/sh'
shell: /bin/sh
platforms:
- name: freebsd-122-latest-py3
driver:
box: bento/freebsd-12.2
- name: freebsd-114-latest-py3
driver:
box: bento/freebsd-11.4
provisioner:
salt_install: bootstrap

View File

@@ -102,34 +102,56 @@ platforms:
driver:
image: saltimages/salt-master-py3:gentoo-stage3-systemd
## SALT `3002.5`
- name: debian-10-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:debian-10
- name: debian-9-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:debian-9
- name: ubuntu-2004-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:ubuntu-20.04
- name: ubuntu-1804-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:ubuntu-18.04
- name: ubuntu-1604-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:ubuntu-16.04
- name: centos-8-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:centos-8
- name: centos-7-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:centos-7
- name: fedora-33-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:fedora-33
- name: fedora-32-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:fedora-32
- name: amazonlinux-2-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:amazonlinux-2
- name: oraclelinux-8-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:oraclelinux-8
- name: oraclelinux-7-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:oraclelinux-7
- name: arch-base-latest-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:arch-base-latest
run_command: /usr/lib/systemd/systemd
- name: gentoo-stage3-latest-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:gentoo-stage3-latest
run_command: /sbin/init
- name: gentoo-stage3-systemd-3002-5-py3
driver:
image: saltimages/salt-3002.5-py3:gentoo-stage3-systemd
## SALT `3002.2`
- name: debian-10-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:debian-10
- name: debian-9-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:debian-9
- name: ubuntu-2004-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:ubuntu-20.04
- name: ubuntu-1804-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:ubuntu-18.04
- name: ubuntu-1604-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:ubuntu-16.04
- name: centos-8-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:centos-8
- name: centos-7-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:centos-7
- name: fedora-33-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:fedora-33
- name: fedora-32-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:fedora-32
- name: opensuse-leap-152-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:opensuse-leap-15.2
@@ -146,144 +168,124 @@ platforms:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: amazonlinux-2-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:amazonlinux-2
- name: oraclelinux-8-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:oraclelinux-8
- name: oraclelinux-7-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:oraclelinux-7
- name: arch-base-latest-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:arch-base-latest
run_command: /usr/lib/systemd/systemd
- name: gentoo-stage3-latest-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:gentoo-stage3-latest
run_command: /sbin/init
- name: gentoo-stage3-systemd-3002-2-py3
driver:
image: saltimages/salt-3002.2-py3:gentoo-stage3-systemd
## SALT `3001.4`
- name: debian-10-3001-4-py3
## SALT `3001.6`
- name: debian-10-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:debian-10
- name: debian-9-3001-4-py3
image: saltimages/salt-3001.6-py3:debian-10
- name: debian-9-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:debian-9
- name: ubuntu-2004-3001-4-py3
image: saltimages/salt-3001.6-py3:debian-9
- name: ubuntu-2004-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:ubuntu-20.04
- name: ubuntu-1804-3001-4-py3
image: saltimages/salt-3001.6-py3:ubuntu-20.04
- name: ubuntu-1804-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:ubuntu-18.04
- name: ubuntu-1604-3001-4-py3
image: saltimages/salt-3001.6-py3:ubuntu-18.04
- name: ubuntu-1604-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:ubuntu-16.04
- name: centos-8-3001-4-py3
image: saltimages/salt-3001.6-py3:ubuntu-16.04
- name: centos-8-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:centos-8
- name: centos-7-3001-4-py3
image: saltimages/salt-3001.6-py3:centos-8
- name: centos-7-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:centos-7
- name: fedora-33-3001-4-py3
image: saltimages/salt-3001.6-py3:centos-7
- name: fedora-33-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:fedora-33
- name: fedora-32-3001-4-py3
image: saltimages/salt-3001.6-py3:fedora-33
- name: fedora-32-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:fedora-32
- name: opensuse-leap-152-3001-4-py3
image: saltimages/salt-3001.6-py3:fedora-32
- name: opensuse-leap-152-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:opensuse-leap-15.2
image: saltimages/salt-3001.6-py3:opensuse-leap-15.2
run_command: /usr/lib/systemd/systemd
# Workaround to avoid intermittent failures on `opensuse-leap-15.2`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: opensuse-tmbl-latest-3001-4-py3
- name: opensuse-tmbl-latest-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:opensuse-tumbleweed-latest
image: saltimages/salt-3001.6-py3:opensuse-tumbleweed-latest
run_command: /usr/lib/systemd/systemd
# Workaround to avoid intermittent failures on `opensuse-tumbleweed`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: amazonlinux-2-3001-4-py3
- name: amazonlinux-2-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:amazonlinux-2
- name: oraclelinux-8-3001-4-py3
image: saltimages/salt-3001.6-py3:amazonlinux-2
- name: oraclelinux-8-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:oraclelinux-8
- name: oraclelinux-7-3001-4-py3
image: saltimages/salt-3001.6-py3:oraclelinux-8
- name: oraclelinux-7-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:oraclelinux-7
- name: arch-base-latest-3001-4-py3
image: saltimages/salt-3001.6-py3:oraclelinux-7
- name: arch-base-latest-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:arch-base-latest
image: saltimages/salt-3001.6-py3:arch-base-latest
run_command: /usr/lib/systemd/systemd
- name: gentoo-stage3-latest-3001-4-py3
- name: gentoo-stage3-latest-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:gentoo-stage3-latest
image: saltimages/salt-3001.6-py3:gentoo-stage3-latest
run_command: /sbin/init
- name: gentoo-stage3-systemd-3001-4-py3
- name: gentoo-stage3-systemd-3001-6-py3
driver:
image: saltimages/salt-3001.4-py3:gentoo-stage3-systemd
image: saltimages/salt-3001.6-py3:gentoo-stage3-systemd
## SALT `3000.6`
- name: debian-10-3000-6-py3
## SALT `3000.8`
- name: debian-10-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:debian-10
- name: debian-9-3000-6-py3
image: saltimages/salt-3000.8-py3:debian-10
- name: debian-9-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:debian-9
- name: ubuntu-1804-3000-6-py3
image: saltimages/salt-3000.8-py3:debian-9
- name: ubuntu-1804-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:ubuntu-18.04
- name: ubuntu-1604-3000-6-py3
image: saltimages/salt-3000.8-py3:ubuntu-18.04
- name: ubuntu-1604-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:ubuntu-16.04
- name: centos-8-3000-6-py3
image: saltimages/salt-3000.8-py3:ubuntu-16.04
- name: centos-8-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:centos-8
- name: centos-7-3000-6-py3
image: saltimages/salt-3000.8-py3:centos-8
- name: centos-7-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:centos-7
- name: opensuse-leap-152-3000-6-py3
image: saltimages/salt-3000.8-py3:centos-7
- name: opensuse-leap-152-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:opensuse-leap-15.2
image: saltimages/salt-3000.8-py3:opensuse-leap-15.2
run_command: /usr/lib/systemd/systemd
# Workaround to avoid intermittent failures on `opensuse-leap-15.2`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
max_ssh_sessions: 1
- name: amazonlinux-2-3000-6-py3
- name: amazonlinux-2-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:amazonlinux-2
- name: oraclelinux-8-3000-6-py3
image: saltimages/salt-3000.8-py3:amazonlinux-2
- name: oraclelinux-8-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:oraclelinux-8
- name: oraclelinux-7-3000-6-py3
image: saltimages/salt-3000.8-py3:oraclelinux-8
- name: oraclelinux-7-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:oraclelinux-7
- name: gentoo-stage3-latest-3000-6-py3
image: saltimages/salt-3000.8-py3:oraclelinux-7
- name: gentoo-stage3-latest-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:gentoo-stage3-latest
image: saltimages/salt-3000.8-py3:gentoo-stage3-latest
run_command: /sbin/init
- name: gentoo-stage3-systemd-3000-6-py3
- name: gentoo-stage3-systemd-3000-8-py3
driver:
image: saltimages/salt-3000.6-py3:gentoo-stage3-systemd
- name: ubuntu-1804-3000-6-py2
image: saltimages/salt-3000.8-py3:gentoo-stage3-systemd
- name: ubuntu-1804-3000-8-py2
driver:
image: saltimages/salt-3000.6-py2:ubuntu-18.04
- name: ubuntu-1604-3000-6-py2
image: saltimages/salt-3000.8-py2:ubuntu-18.04
- name: ubuntu-1604-3000-8-py2
driver:
image: saltimages/salt-3000.6-py2:ubuntu-16.04
- name: arch-base-latest-3000-6-py2
image: saltimages/salt-3000.8-py2:ubuntu-16.04
- name: arch-base-latest-3000-8-py2
driver:
image: saltimages/salt-3000.6-py2:arch-base-latest
image: saltimages/salt-3000.8-py2:arch-base-latest
run_command: /usr/lib/systemd/systemd
provisioner:
@@ -310,6 +312,7 @@ suites:
state_top:
base:
'*':
- postgres._mapdata
- postgres
pillars:
top.sls:

View File

@@ -0,0 +1,13 @@
# yamllint disable rule:indentation rule:line-length
# {{ grains.get("osfinger", grains.os) }}
---
{#- use salt.slsutil.serialize to avoid encoding errors on some platforms #}
{{ salt["slsutil.serialize"](
"yaml",
map,
default_flow_style=False,
allow_unicode=True,
)
| regex_replace("^\s+'$", "'", multiline=True)
| trim
}}

View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
---
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split("/")[0] %}
{%- from tplroot ~ "/map.jinja" import postgres with context %}
{%- set _mapdata = {
"values": postgres,
} %}
{%- do salt["log.debug"]("### MAP.JINJA DUMP ###\n" ~ _mapdata | yaml(False)) %}
{%- set output_dir = "/temp" if grains.os_family == "Windows" else "/tmp" %}
{%- set output_file = output_dir ~ "/salt_mapdata_dump.yaml" %}
{{ tplroot }}-mapdata-dump:
file.managed:
- name: {{ output_file }}
- source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
- template: jinja
- context:
map: {{ _mapdata | yaml }}

View File

@@ -6,6 +6,9 @@ title: postgres formula
maintainer: SaltStack Formulas
license: Apache-2.0
summary: Verify that the postgres formula is setup and configured correctly
depends:
- name: share
path: test/integration/share
supports:
- platform-name: debian
- platform-name: ubuntu
@@ -14,6 +17,7 @@ supports:
- platform-name: opensuse
- platform-name: suse
- platform-name: freebsd
- platform-name: openbsd
- platform-name: amazon
- platform-name: oracle
- platform-name: arch

View File

@@ -0,0 +1,22 @@
# InSpec Profile: `share`
This shows the implementation of the `share` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md).
Its goal is to share the libraries between all profiles.
## Libraries
### `system`
The `system` library provides easy access to system dependent information:
- `system.platform`: based on `inspec.platform`, modify to values that are more consistent from a SaltStack perspective
- `system.platform[:family]` provide a family name for Arch and Gentoo
- `system.platform[:name]` append `linux` to both `amazon` and `oracle`; ensure Windows platforms are resolved as simply `windows`
- `system.platform[:release]` tweak Arch, Amazon Linux, Gentoo, openSUSE and Windows:
- `Arch` is always `base-latest`
- `Amazon Linux` release `2018` is resolved as `1`
- `Gentoo` release is trimmed to its major version number and then the init system is appended (i.e. `sysv` or `sysd`)
- `openSUSE` is resolved as `tumbleweed` if the `platform[:release]` is in date format
- `Windows` uses the widely-used release number (e.g. `8.1` or `2019-server`) in place of the actual system release version
- `system.platform[:finger]` is the concatenation of the name and the major release number (except for Ubuntu, which gives `ubuntu-20.04` for example)

View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: share
title: InSpec shared resources
maintainer: SaltStack Formulas
license: Apache-2.0
summary: shared resources
supports:
- platform-name: debian
- platform-name: ubuntu
- platform-name: centos
- platform-name: fedora
- platform-name: opensuse
- platform-name: suse
- platform-name: freebsd
- platform-name: openbsd
- platform-name: amazon
- platform-name: oracle
- platform-name: arch
- platform-name: gentoo
- platform: windows

View File

@@ -0,0 +1,90 @@
# frozen_string_literal: true
# system.rb -- InSpec resources for system values
# Author: Daniel Dehennin <daniel.dehennin@ac-dijon.fr>
# Copyright (C) 2020 Daniel Dehennin <daniel.dehennin@ac-dijon.fr>
class SystemResource < Inspec.resource(1)
name 'system'
attr_reader :platform
def initialize
super
@platform = build_platform
end
private
def build_platform
{
family: build_platform_family,
name: build_platform_name,
release: build_platform_release,
finger: build_platform_finger
}
end
def build_platform_family
case inspec.platform[:name]
when 'arch', 'gentoo'
inspec.platform[:name]
else
inspec.platform[:family]
end
end
def build_platform_name
case inspec.platform[:name]
when 'amazon', 'oracle'
"#{inspec.platform[:name]}linux"
when /^windows_/
inspec.platform[:family]
else
inspec.platform[:name]
end
end
# rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
def build_platform_release
case inspec.platform[:name]
when 'amazon'
# `2018` relase is named `1` in kitchen.yaml
inspec.platform[:release].gsub(/2018.*/, '1')
when 'arch'
'base-latest'
when 'gentoo'
"#{inspec.platform[:release].split('.')[0]}-#{derive_gentoo_init_system}"
when 'opensuse'
# rubocop:disable Style/NumericLiterals,Layout/LineLength
inspec.platform[:release].to_i > 20210101 ? 'tumbleweed' : inspec.platform[:release]
# rubocop:enable Style/NumericLiterals,Layout/LineLength
when 'windows_8.1_pro'
'8.1'
when 'windows_server_2019_datacenter'
'2019-server'
when 'windows_server_2016_datacenter'
'2016-server'
else
inspec.platform[:release]
end
end
# rubocop:enable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
def derive_gentoo_init_system
inspec.command('systemctl').exist? ? 'sysd' : 'sysv'
end
def build_platform_finger
"#{build_platform_name}-#{build_finger_release}"
end
def build_finger_release
case inspec.platform[:name]
when 'ubuntu'
build_platform_release.split('.').slice(0, 2).join('.')
else
build_platform_release.split('.')[0]
end
end
end