From 25496169f635d98a0e85158ec77be373e9a5d9e5 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 15 Dec 2021 20:51:15 +0100 Subject: [PATCH 1/3] modulesync 5.2.0 --- .github/CONTRIBUTING.md | 7 +++---- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 32 ++++++++++---------------------- .msync.yml | 2 +- .puppet-lint.rc | 3 +++ Dockerfile | 2 +- Gemfile | 6 +++--- Rakefile | 2 +- 8 files changed, 23 insertions(+), 33 deletions(-) create mode 100644 .puppet-lint.rc diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 048d2b55..8b466cfb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet, you must set an environment variable such as: ```sh -export PUPPET_VERSION="~> 5.5.6" +export PUPPET_GEM_VERSION="~> 6.1.0" ``` You can install all needed gems for spec tests into the modules directory by @@ -232,17 +232,16 @@ simple tests against it after applying the module. You can run this with: ```sh -BEAKER_setfile=debian10-x64 bundle exec rake beaker +BEAKER_setfile=debian11-64 bundle exec rake beaker ``` You can replace the string `debian10` with any common operating system. The following strings are known to work: -* ubuntu1604 * ubuntu1804 * ubuntu2004 -* debian9 * debian10 +* debian11 * centos7 * centos8 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba56a5f8..d6ce8f53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ name: CI on: pull_request concurrency: - group: ${{ github.head_ref }} + group: ${{ github.ref_name }} cancel-in-progress: true jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 664ba694..15f17213 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,26 +9,14 @@ on: tags: - '*' -env: - BUNDLE_WITHOUT: development:test:system_tests - jobs: - deploy: - name: 'deploy to forge' - runs-on: ubuntu-latest - if: github.repository_owner == 'voxpupuli' - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '2.7' - bundler-cache: true - - name: Build and Deploy - env: - # Configure secrets here: - # https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets - BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}' - BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}' - run: bundle exec rake module:push + release: + name: Release + uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1 + with: + allowed_owner: 'voxpupuli' + secrets: + # Configure secrets here: + # https://docs.github.com/en/actions/security-guides/encrypted-secrets + username: ${{ secrets.PUPPET_FORGE_USERNAME }} + api_key: ${{ secrets.PUPPET_FORGE_API_KEY }} diff --git a/.msync.yml b/.msync.yml index ab186de8..968a9367 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '5.0.1' +modulesync_config_version: '5.2.0' diff --git a/.puppet-lint.rc b/.puppet-lint.rc new file mode 100644 index 00000000..dd8272c7 --- /dev/null +++ b/.puppet-lint.rc @@ -0,0 +1,3 @@ +--fail-on-warnings +--no-parameter_documentation-check +--no-parameter_types-check diff --git a/Dockerfile b/Dockerfile index e3cf307f..8dd82d63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /opt/puppet # https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39 RUN mkdir -p /etc/sv -ARG PUPPET_VERSION="~> 6.0" +ARG PUPPET_GEM_VERSION="~> 6.0" ARG PARALLEL_TEST_PROCESSORS=4 # Cache gems diff --git a/Gemfile b/Gemfile index 4b2ffc0e..225c3969 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,10 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -source ENV['GEM_SOURCE'] || "https://rubygems.org" +source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 4.0', :require => false + gem 'voxpupuli-test', '~> 5.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'puppet_metadata', '~> 1.0', :require => false @@ -28,7 +28,7 @@ end gem 'rake', :require => false gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] -puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0' +puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0' gem 'puppet', puppetversion, :require => false, :groups => [:test] # vim: syntax=ruby diff --git a/Rakefile b/Rakefile index 80b799d6..f92f0516 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -# Attempt to load voxupuli-test (which pulls in puppetlabs_spec_helper), +# Attempt to load voxpupuli-test (which pulls in puppetlabs_spec_helper), # otherwise attempt to load it directly. begin require 'voxpupuli/test/rake' From 39d76554bdee256f88de9a6406a29366c0ddf030 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 3 Jun 2022 11:02:36 +0200 Subject: [PATCH 2/3] modulesync 5.3.0 --- .msync.yml | 2 +- Gemfile | 2 +- spec/spec_helper_acceptance.rb | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.msync.yml b/.msync.yml index 968a9367..02353859 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '5.2.0' +modulesync_config_version: '5.3.0' diff --git a/Gemfile b/Gemfile index 225c3969..07209b79 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 5.0', :require => false + gem 'voxpupuli-test', '~> 5.4', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'puppet_metadata', '~> 1.0', :require => false diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index c201477a..d3a6e23c 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -5,8 +5,6 @@ require 'voxpupuli/acceptance/spec_helper_acceptance' -ENV['BEAKER_FACTER_SQUID_IP'] = File.read(File.expand_path('~/SQUID_IP')).chomp - configure_beaker Dir['./spec/support/acceptance/**/*.rb'].sort.each { |f| require f } From 87e89eb8e655c66117fa43b3a35f5ceebbee8f9b Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 3 Jun 2022 11:19:10 +0200 Subject: [PATCH 3/3] puppet-lint: Disable failing linter --- manifests/bird_exporter.pp | 2 +- manifests/daemon.pp | 2 +- manifests/dellhw_exporter.pp | 2 +- manifests/ipsec_exporter.pp | 2 +- manifests/nginx_vts_exporter.pp | 2 +- manifests/openldap_exporter.pp | 4 ++-- manifests/openvpn_exporter.pp | 2 +- manifests/postfix_exporter.pp | 2 +- manifests/postgres_exporter.pp | 2 +- manifests/unbound_exporter.pp | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/manifests/bird_exporter.pp b/manifests/bird_exporter.pp index e397b490..7975378f 100644 --- a/manifests/bird_exporter.pp +++ b/manifests/bird_exporter.pp @@ -67,7 +67,7 @@ # @author Tim Meusel # class prometheus::bird_exporter ( - String $download_extension = '', + String $download_extension = '', # lint:ignore:params_empty_string_assignment Prometheus::Uri $download_url_base = 'https://github.com/czerwonk/bird_exporter/releases', Array[String] $extra_groups = ['bird'], String[1] $group = 'bird-exporter', diff --git a/manifests/daemon.pp b/manifests/daemon.pp index 0b0cedc5..2329d923 100644 --- a/manifests/daemon.pp +++ b/manifests/daemon.pp @@ -67,7 +67,7 @@ Array $extra_groups = [], Boolean $manage_group = true, Boolean $purge = true, - String $options = '', + String $options = '', # lint:ignore:params_empty_string_assignment Prometheus::Initstyle $init_style = $facts['service_provider'], Stdlib::Ensure::Service $service_ensure = 'running', Boolean $service_enable = true, diff --git a/manifests/dellhw_exporter.pp b/manifests/dellhw_exporter.pp index 4e3ad065..1d9561a1 100644 --- a/manifests/dellhw_exporter.pp +++ b/manifests/dellhw_exporter.pp @@ -80,7 +80,7 @@ Boolean $export_scrape_job = false, Optional[Stdlib::Host] $scrape_host = undef, Stdlib::Port $scrape_port = 9137, - String $scrape_ipadress = '', + String $scrape_ipadress = '', # lint:ignore:params_empty_string_assignment String[1] $scrape_job_name = 'dellhw', Optional[Hash] $scrape_job_labels = undef, Optional[String[1]] $bin_name = undef, diff --git a/manifests/ipsec_exporter.pp b/manifests/ipsec_exporter.pp index 4d9f2c7a..50af9fb3 100644 --- a/manifests/ipsec_exporter.pp +++ b/manifests/ipsec_exporter.pp @@ -60,7 +60,7 @@ String[1] $user = 'ipsec-exporter', String[1] $version = '0.3.2', String[1] $os = downcase($facts['kernel']), - String $options = '', + String $options = '', # lint:ignore:params_empty_string_assignment Prometheus::Initstyle $init_style = $facts['service_provider'], Prometheus::Install $install_method = $prometheus::install_method, Optional[Prometheus::Uri] $download_url = undef, diff --git a/manifests/nginx_vts_exporter.pp b/manifests/nginx_vts_exporter.pp index 9b49c6e5..75369ca2 100644 --- a/manifests/nginx_vts_exporter.pp +++ b/manifests/nginx_vts_exporter.pp @@ -72,7 +72,7 @@ Boolean $manage_service = true, Boolean $manage_user = true, String $os = downcase($facts['kernel']), - String $extra_options = '', + String $extra_options = '', # lint:ignore:params_empty_string_assignment Optional[Prometheus::Uri] $download_url = undef, String $arch = $prometheus::real_arch, String $bin_dir = $prometheus::bin_dir, diff --git a/manifests/openldap_exporter.pp b/manifests/openldap_exporter.pp index 4ec73181..22bb422e 100644 --- a/manifests/openldap_exporter.pp +++ b/manifests/openldap_exporter.pp @@ -51,7 +51,7 @@ # @param proxy_type # Optional proxy server type (none|http|https|ftp) class prometheus::openldap_exporter ( - String $download_extension = '', + String $download_extension = '', # lint:ignore:params_empty_string_assignment Array[String] $extra_groups = [], String[1] $group = 'openldap-exporter', String[1] $package_ensure = 'latest', @@ -69,7 +69,7 @@ Boolean $manage_service = true, Boolean $manage_user = true, String[1] $os = downcase($facts['kernel']), - String $options = '', + String $options = '', # lint:ignore:params_empty_string_assignment Optional[Prometheus::Uri] $download_url = undef, Stdlib::Absolutepath $bin_dir = $prometheus::bin_dir, Boolean $export_scrape_job = false, diff --git a/manifests/openvpn_exporter.pp b/manifests/openvpn_exporter.pp index 21784c75..17628fd8 100644 --- a/manifests/openvpn_exporter.pp +++ b/manifests/openvpn_exporter.pp @@ -52,7 +52,7 @@ # @param proxy_type # Optional proxy server type (none|http|https|ftp) class prometheus::openvpn_exporter ( - String $download_extension = '', + String $download_extension = '', # lint:ignore:params_empty_string_assignment Prometheus::Uri $download_url_base = 'https://github.com/wandera/openvpn_exporter/releases', Array[String[1]] $extra_groups = [], String[1] $group = 'openvpn-exporter', diff --git a/manifests/postfix_exporter.pp b/manifests/postfix_exporter.pp index 71058d3d..3dc9f23d 100644 --- a/manifests/postfix_exporter.pp +++ b/manifests/postfix_exporter.pp @@ -59,7 +59,7 @@ Prometheus::Install $install_method = 'url', Optional[Stdlib::HTTPUrl] $download_url = undef, Stdlib::HTTPUrl $download_url_base = 'https://github.com/kumina/postfix_exporter/releases', - String $download_extension = '', + String $download_extension = '', # lint:ignore:params_empty_string_assignment String[1] $version = '0.2.0', Optional[String[1]] $proxy_server = undef, Optional[Enum['none', 'http', 'https', 'ftp']] $proxy_type = undef, diff --git a/manifests/postgres_exporter.pp b/manifests/postgres_exporter.pp index 333874b9..11b4491c 100644 --- a/manifests/postgres_exporter.pp +++ b/manifests/postgres_exporter.pp @@ -82,7 +82,7 @@ Boolean $manage_service = true, Boolean $manage_user = true, String[1] $os = downcase($facts['kernel']), - String $options = '', + String $options = '', # lint:ignore:params_empty_string_assignment Optional[Prometheus::Uri] $download_url = undef, Optional[String] $postgres_pass = undef, Optional[String] $postgres_user = undef, diff --git a/manifests/unbound_exporter.pp b/manifests/unbound_exporter.pp index 4091afd5..3bfd4d12 100644 --- a/manifests/unbound_exporter.pp +++ b/manifests/unbound_exporter.pp @@ -57,7 +57,7 @@ # @author Tim Meusel # class prometheus::unbound_exporter ( - String $download_extension = '', + String $download_extension = '', # lint:ignore:params_empty_string_assignment Prometheus::Uri $download_url_base = 'https://github.com/kumina/unbound_exporter/releases', Array[String] $extra_groups = ['unbound'], String[1] $group = 'unbound-exporter',