From 534a1f6f2bb11e52e1b9211427c00fc1030dd687 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 10 Feb 2021 14:56:43 +0000 Subject: [PATCH] feat(gentoo): add support and CI --- kitchen.yml | 26 +++++++++++ .../integration/default/controls/pkgs_spec.rb | 5 +++ test/integration/default/inspec.yml | 1 + test/salt/pillar/gentoo.sls | 45 +++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 test/salt/pillar/gentoo.sls diff --git a/kitchen.yml b/kitchen.yml index 3d165a2..e8f0187 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -47,6 +47,13 @@ platforms: - name: oraclelinux-8-master-py3 driver: image: saltimages/salt-master-py3:oraclelinux-8 + - name: gentoo-stage3-latest-master-py3 + driver: + image: saltimages/salt-master-py3:gentoo-stage3-latest + run_command: /sbin/init + - name: gentoo-stage3-systemd-master-py3 + driver: + image: saltimages/salt-master-py3:gentoo-stage3-systemd ## SALT `3000.3` - name: debian-10-3000-3-py3 @@ -359,3 +366,22 @@ suites: verifier: inspec_tests: - path: test/integration/default + - name: gentoo + includes: + - gentoo-stage3-latest-master-py3 + - gentoo-stage3-systemd-master-py3 + provisioner: + state_top: + base: + '*': + - packages + pillars: + top.sls: + base: + '*': + - packages + pillars_from_files: + packages.sls: test/salt/pillar/gentoo.sls + verifier: + inspec_tests: + - path: test/integration/default diff --git a/test/integration/default/controls/pkgs_spec.rb b/test/integration/default/controls/pkgs_spec.rb index 4f76f22..34ff634 100644 --- a/test/integration/default/controls/pkgs_spec.rb +++ b/test/integration/default/controls/pkgs_spec.rb @@ -54,6 +54,11 @@ platform_packages = %w[ruby] held_packages = {} lock_file = '' + when 'gentoo' + # Empty for now: The `package` resource is not supported on your OS yet. + platform_packages = %w[] + held_packages = {} + lock_file = '' end end diff --git a/test/integration/default/inspec.yml b/test/integration/default/inspec.yml index 2cb4f6c..184c0dd 100644 --- a/test/integration/default/inspec.yml +++ b/test/integration/default/inspec.yml @@ -20,3 +20,4 @@ supports: - platform-name: amazon - platform-name: oracle - platform-name: arch + - platform-name: gentoo diff --git a/test/salt/pillar/gentoo.sls b/test/salt/pillar/gentoo.sls new file mode 100644 index 0000000..3a57a2d --- /dev/null +++ b/test/salt/pillar/gentoo.sls @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +packages: + pkgs: + held: + - app-arch/alien + - sys-process/iotop + wanted: + - net-analyzer/netcat + - dev-lang/ruby + - dev-vcs/git + - sys-apps/less + - sys-devel/bc + - net-misc/curl + # - net-analyzer/fail2ban + unwanted: + - net-dns/avahi + required: + pkgs: + - dev-vcs/git + pips: + ### Not working: + ### ERROR: (Gentoo) Please run pip with the --user option to avoid + ### breaking python-exec + # wanted: + # - attrs + unwanted: + - campbel + - reverse_geocode + - indy-crypto + gems: + wanted: + - progressbar + - minitest + unwanted: + - diff-lcs + - kitchen-vagrant + - kwalify + # remote_pkgs: + # zoom: 'https://zoom.us/client/latest/zoom_x86_64.tar.xz' + + # Override the default setting to prevent wasteful delays in Travis + retry_options: + attempts: 1