diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index daceb64..048d2b5 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -124,36 +124,26 @@ If you have Ruby 2.x or want a specific version of Puppet, you must set an environment variable such as: ```sh -export PUPPET_GEM_VERSION="~> 6.1.0" +export PUPPET_VERSION="~> 5.5.6" ``` You can install all needed gems for spec tests into the modules directory by running: ```sh -bundle config set --local path '.vendor/' -bundle config set --local without 'development system_tests release' -bundle install --jobs "$(nproc)" +bundle install --path .vendor/ --without development system_tests release --jobs "$(nproc)" ``` If you also want to run acceptance tests: ```sh -bundle config set --local path '.vendor/' -bundle config set --local without 'development release' -bundle config set --local with 'system_tests' -bundle install --jobs "$(nproc)" +bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)" ``` Our all in one solution if you don't know if you need to install or update gems: ```sh -bundle config set --local path '.vendor/' -bundle config set --local without 'development release' -bundle config set --local with 'system_tests' -bundle install --jobs "$(nproc)" -bundle update -bundle clean +bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"; bundle update; bundle clean ``` As an alternative to the `--jobs "$(nproc)` parameter, you can set an @@ -242,29 +232,19 @@ simple tests against it after applying the module. You can run this with: ```sh -BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker +BEAKER_setfile=debian10-x64 bundle exec rake beaker ``` -or - -```sh -BEAKER_PUPPET_COLLECTION=none BEAKER_setfile=archlinux-64 bundle exec rake beaker -``` - -This latter example will use the distribution's own version of Puppet. - -You can replace the string `debian11` with any common operating system. +You can replace the string `debian10` with any common operating system. The following strings are known to work: +* ubuntu1604 +* ubuntu1804 * ubuntu2004 -* ubuntu2204 -* debian11 -* debian12 -* centos9 -* archlinux -* almalinux8 -* almalinux9 -* fedora36 +* debian9 +* debian10 +* centos7 +* centos8 For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests). diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..cacadf2 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,3 @@ +# Vox Pupuli Security Policy + +Our vulnerabilities reporting process is at https://voxpupuli.org/security/ diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index f5b5d7a..0000000 --- a/.github/release.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Managed by modulesync - DO NOT EDIT -# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ - -# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes - -changelog: - exclude: - labels: - - duplicate - - invalid - - modulesync - - question - - skip-changelog - - wont-fix - - wontfix - - categories: - - title: Breaking Changes 🛠 - labels: - - backwards-incompatible - - - title: New Features 🎉 - labels: - - enhancement - - - title: Bug Fixes 🐛 - labels: - - bug - - - title: Documentation Updates 📚 - labels: - - documentation - - docs - - - title: Dependency Updates ⬆️ - labels: - - dependencies - - - title: Other Changes - labels: - - "*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c32acf..d08d05e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,19 +4,87 @@ name: CI -# yamllint disable-line rule:truthy -on: - pull_request: {} - push: - branches: - - main - - master +on: pull_request concurrency: - group: ${{ github.ref_name }} + group: ${{ github.head_ref }} cancel-in-progress: true jobs: - puppet: - name: Puppet - uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v3 + setup_matrix: + name: 'Setup Test Matrix' + runs-on: ubuntu-latest + timeout-minutes: 40 + outputs: + puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }} + github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }} + env: + BUNDLE_WITHOUT: development:system_tests:release + steps: + - uses: actions/checkout@v2 + - name: Setup ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0' + bundler-cache: true + - name: Run static validations + run: bundle exec rake validate lint check + - name: Run rake rubocop + run: bundle exec rake rubocop + - name: Setup Test Matrix + id: get-outputs + run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false + + unit: + needs: setup_matrix + runs-on: ubuntu-latest + timeout-minutes: 40 + strategy: + fail-fast: false + matrix: + include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}} + env: + BUNDLE_WITHOUT: development:system_tests:release + PUPPET_VERSION: "~> ${{ matrix.puppet }}.0" + name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }}) + steps: + - uses: actions/checkout@v2 + - name: Setup ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Run tests + run: bundle exec rake parallel_spec + + acceptance: + needs: setup_matrix + runs-on: ubuntu-latest + env: + BUNDLE_WITHOUT: development:test:release + strategy: + fail-fast: false + matrix: + include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}} + name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }} + steps: + - uses: actions/checkout@v2 + - name: Setup ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0' + bundler-cache: true + - name: Run tests + run: bundle exec rake beaker + env: + BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }} + BEAKER_setfile: ${{ matrix.setfile.value }} + + tests: + needs: + - unit + - acceptance + runs-on: ubuntu-latest + name: Test suite + steps: + - run: echo Test suite completed diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index 73be88d..0000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# Managed by modulesync - DO NOT EDIT -# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ - -name: "Pull Request Labeler" - -# yamllint disable-line rule:truthy -on: - pull_request_target: {} - -jobs: - labeler: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v5 diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml deleted file mode 100644 index 01efa1a..0000000 --- a/.github/workflows/prepare_release.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Managed by modulesync - DO NOT EDIT -# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ - -name: 'Prepare Release' - -on: - workflow_dispatch: - inputs: - version: - description: 'Module version to be released. Must be a valid semver string without leading v. (1.2.3)' - required: false - -jobs: - release_prep: - uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v3' - with: - version: ${{ github.event.inputs.version }} - allowed_owner: 'voxpupuli' - secrets: - # Configure secrets here: - # https://docs.github.com/en/actions/security-guides/encrypted-secrets - github_pat: '${{ secrets.PCCI_PAT_RELEASE_PREP }}' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3db60fb..664ba69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,20 +4,31 @@ name: Release -# yamllint disable-line rule:truthy on: push: tags: - '*' +env: + BUNDLE_WITHOUT: development:test:system_tests + jobs: - release: - name: Release - uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v3 - 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 }} + 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 diff --git a/.gitignore b/.gitignore index adea1b0..9b95224 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,23 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -/pkg/ -/Gemfile.lock -/Gemfile.local -/vendor/ -/.vendor/ -/spec/fixtures/manifests/ -/spec/fixtures/modules/ -/.vagrant/ -/.bundle/ -/.ruby-version -/coverage/ -/log/ -/.idea/ -/.dependencies/ -/.librarian/ -/Puppetfile.lock +pkg/ +Gemfile.lock +Gemfile.local +vendor/ +.vendor/ +spec/fixtures/manifests/ +spec/fixtures/modules/ +.vagrant/ +.bundle/ +.ruby-version +coverage/ +log/ +.idea/ +.dependencies/ +.librarian/ +Puppetfile.lock *.iml .*.sw? -/.yardoc/ -/Guardfile -bolt-debug.log -.rerun.json +.yardoc/ +Guardfile diff --git a/.msync.yml b/.msync.yml index b86acb8..a83abd9 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: '9.7.0' +modulesync_config_version: '5.1.0' diff --git a/.overcommit.yml b/.overcommit.yml index 4ed994c..d367ada 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -43,12 +43,10 @@ PreCommit: enabled: true description: 'Runs rubocop on modified files only' command: ['bundle', 'exec', 'rubocop'] - RakeTarget: + PuppetLint: enabled: true - description: 'Runs lint on modified files only' - targets: - - 'lint' - command: ['bundle', 'exec', 'rake'] + description: 'Runs puppet-lint on modified files only' + command: ['bundle', 'exec', 'puppet-lint'] YamlSyntax: enabled: true JsonSyntax: diff --git a/.pmtignore b/.pmtignore index a9d37aa..65f5051 100644 --- a/.pmtignore +++ b/.pmtignore @@ -1,39 +1,37 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -/docs/ -/pkg/ -/Gemfile -/Gemfile.lock -/Gemfile.local -/vendor/ -/.vendor/ -/spec/ -/Rakefile -/.vagrant/ -/.bundle/ -/.ruby-version -/coverage/ -/log/ -/.idea/ -/.dependencies/ -/.github/ -/.librarian/ -/Puppetfile.lock -/Puppetfile +docs/ +pkg/ +Gemfile +Gemfile.lock +Gemfile.local +vendor/ +.vendor/ +spec/ +Rakefile +.vagrant/ +.bundle/ +.ruby-version +coverage/ +log/ +.idea/ +.dependencies/ +.github/ +.librarian/ +Puppetfile.lock *.iml -/.editorconfig -/.fixtures.yml -/.gitignore -/.msync.yml -/.overcommit.yml -/.pmtignore -/.rspec -/.rspec_parallel -/.rubocop.yml -/.sync.yml +.editorconfig +.fixtures.yml +.gitignore +.msync.yml +.overcommit.yml +.pmtignore +.rspec +.rspec_parallel +.rubocop.yml +.sync.yml .*.sw? -/.yardoc/ -/.yardopts -/Dockerfile -/HISTORY.md +.yardoc/ +.yardopts +Dockerfile diff --git a/.puppet-lint.rc b/.puppet-lint.rc index 37817b6..dd8272c 100644 --- a/.puppet-lint.rc +++ b/.puppet-lint.rc @@ -1,4 +1,3 @@ -# Managed by modulesync - DO NOT EDIT -# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ - --fail-on-warnings +--no-parameter_documentation-check +--no-parameter_types-check diff --git a/.github/labeler.yml b/.rspec similarity index 63% rename from .github/labeler.yml rename to .rspec index f2d08d6..f634583 100644 --- a/.github/labeler.yml +++ b/.rspec @@ -1,6 +1,5 @@ ---- # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -skip-changelog: - - head-branch: ['^release-*', 'release'] +--format documentation +--color diff --git a/.rspec_parallel b/.rspec_parallel new file mode 100644 index 0000000..a9a84f8 --- /dev/null +++ b/.rspec_parallel @@ -0,0 +1,4 @@ +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +--format progress diff --git a/.sync.yml b/.sync.yml index 130aaeb..35424a9 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,5 +1,5 @@ --- -.puppet-lint.rc: - enabled_lint_checks: - - parameter_documentation - - parameter_types +Gemfile: + optional: + ':test': + - gem: puppet-lint-param-docs diff --git a/CHANGELOG.md b/CHANGELOG.md index 05414e3..95a2315 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,60 +4,6 @@ All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module. -## [v3.3.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v3.3.0) (2025-02-11) - -[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v3.2.0...v3.3.0) - -**Merged pull requests:** - -- Add Ubuntu 24.04 support [\#47](https://github.com/voxpupuli/puppet-hashi_stack/pull/47) ([bastelfreak](https://github.com/bastelfreak)) -- puppetlabs/apt: Allow 10.x [\#45](https://github.com/voxpupuli/puppet-hashi_stack/pull/45) ([bastelfreak](https://github.com/bastelfreak)) - -## [v3.2.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v3.2.0) (2024-03-24) - -[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v3.1.0...v3.2.0) - -**Implemented enhancements:** - -- Add support for AArch64/ARM64 binaries [\#36](https://github.com/voxpupuli/puppet-hashi_stack/pull/36) ([rgrizzell](https://github.com/rgrizzell)) - -## [v3.1.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v3.1.0) (2023-11-19) - -[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v3.0.0...v3.1.0) - -**Implemented enhancements:** - -- Add Debian 12 support [\#34](https://github.com/voxpupuli/puppet-hashi_stack/pull/34) ([bastelfreak](https://github.com/bastelfreak)) - -## [v3.0.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v3.0.0) (2023-08-19) - -[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v2.2.0...v3.0.0) - -**Breaking changes:** - -- Drop Puppet 6 support [\#28](https://github.com/voxpupuli/puppet-hashi_stack/pull/28) ([bastelfreak](https://github.com/bastelfreak)) - -**Implemented enhancements:** - -- Add Ubuntu 22.04 support [\#32](https://github.com/voxpupuli/puppet-hashi_stack/pull/32) ([bastelfreak](https://github.com/bastelfreak)) -- Add Debian 11 support [\#31](https://github.com/voxpupuli/puppet-hashi_stack/pull/31) ([bastelfreak](https://github.com/bastelfreak)) -- Add EL9 support [\#30](https://github.com/voxpupuli/puppet-hashi_stack/pull/30) ([bastelfreak](https://github.com/bastelfreak)) -- Add AlmaLinux/Rocky/OracleLinux support [\#29](https://github.com/voxpupuli/puppet-hashi_stack/pull/29) ([bastelfreak](https://github.com/bastelfreak)) -- Add Puppet 8 support [\#27](https://github.com/voxpupuli/puppet-hashi_stack/pull/27) ([bastelfreak](https://github.com/bastelfreak)) -- puppetlabs/stdlib: Allow 9.x [\#26](https://github.com/voxpupuli/puppet-hashi_stack/pull/26) ([bastelfreak](https://github.com/bastelfreak)) - -## [v2.2.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v2.2.0) (2023-01-27) - -[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v2.1.0...v2.2.0) - -**Implemented enhancements:** - -- add toggle for enabling yum repo [\#21](https://github.com/voxpupuli/puppet-hashi_stack/pull/21) ([wimkorevaar](https://github.com/wimkorevaar)) - -**Merged pull requests:** - -- use new gpg key [\#22](https://github.com/voxpupuli/puppet-hashi_stack/pull/22) ([BDelacour](https://github.com/BDelacour)) - ## [v2.1.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v2.1.0) (2022-08-28) [Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v2.0.1...v2.1.0) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e3cf307 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# MANAGED BY MODULESYNC +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +FROM ruby:2.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 PARALLEL_TEST_PROCESSORS=4 + +# Cache gems +COPY Gemfile . +RUN bundle install --without system_tests development release --path=${BUNDLE_PATH:-vendor/bundle} + +COPY . . + +RUN bundle install +RUN bundle exec rake release_checks + +# Container should not saved +RUN exit 1 diff --git a/Gemfile b/Gemfile index f08ae17..113a361 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,14 @@ # 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', '~> 10.0', :require => false - gem 'puppet_metadata', '~> 5.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 + gem 'puppet-lint-param-docs', :require => false end group :development do @@ -14,17 +17,19 @@ group :development do end group :system_tests do - gem 'voxpupuli-acceptance', '~> 3.5', :require => false + gem 'voxpupuli-acceptance', '~> 1.0', :require => false end group :release do - gem 'voxpupuli-release', '~> 3.0', :require => false + gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5' + gem 'voxpupuli-release', '>= 1.2.0', :require => false + gem 'puppet-strings', '>= 2.2', :require => false end gem 'rake', :require => false gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] -puppetversion = ENV['PUPPET_GEM_VERSION'] || [">= 7.24", "< 9"] +puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0' gem 'puppet', puppetversion, :require => false, :groups => [:test] # vim: syntax=ruby diff --git a/REFERENCE.md b/REFERENCE.md index a61d1a8..0f08b44 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -6,11 +6,11 @@ ### Classes -* [`hashi_stack::repo`](#hashi_stack--repo): Set up the package repository for the HashiCorp Stack components +* [`hashi_stack::repo`](#hashi_stackrepo): Set up the package repository for the HashiCorp Stack components ## Classes -### `hashi_stack::repo` +### `hashi_stack::repo` This class installs the hashicorp repository @@ -36,24 +36,23 @@ package { 'packer': The following parameters are available in the `hashi_stack::repo` class: -* [`priority`](#-hashi_stack--repo--priority) -* [`proxy`](#-hashi_stack--repo--proxy) -* [`key_id`](#-hashi_stack--repo--key_id) -* [`key_source`](#-hashi_stack--repo--key_source) -* [`description`](#-hashi_stack--repo--description) -* [`rpm_base`](#-hashi_stack--repo--rpm_base) -* [`repo_gpgcheck`](#-hashi_stack--repo--repo_gpgcheck) -* [`repo_enabled`](#-hashi_stack--repo--repo_enabled) +* [`priority`](#priority) +* [`proxy`](#proxy) +* [`key_id`](#key_id) +* [`key_source`](#key_source) +* [`description`](#description) +* [`rpm_base`](#rpm_base) +* [`repo_gpgcheck`](#repo_gpgcheck) -##### `priority` +##### `priority` Data type: `Optional[Integer]` A numeric priority for the repo, passed to the package management system -Default value: `undef` +Default value: ``undef`` -##### `proxy` +##### `proxy` Data type: `String` @@ -61,15 +60,15 @@ The URL of a HTTP proxy to use for package downloads (YUM only) Default value: `'absent'` -##### `key_id` +##### `key_id` Data type: `String` GPG key to authenticate Apt package signatures. -Default value: `'798AEC654E5C15428C8E42EEAA16FCBCA621E701'` +Default value: `'E8A032E094D8EB4EA189D270DA418C88A3219F7B'` -##### `key_source` +##### `key_source` Data type: `Stdlib::HTTPSUrl` @@ -77,7 +76,7 @@ The location of an existing GPG key file to copy. Default value: `'https://apt.releases.hashicorp.com/gpg'` -##### `description` +##### `description` Data type: `String` @@ -85,7 +84,7 @@ Repository description Default value: `'HashiCorp package repository.'` -##### `rpm_base` +##### `rpm_base` Data type: `String` @@ -93,19 +92,11 @@ Base URL for the Yum repository Default value: `'https://rpm.releases.hashicorp.com'` -##### `repo_gpgcheck` +##### `repo_gpgcheck` Data type: `Integer[0,1]` -enables gpg validation of packages from the repo + Default value: `0` -##### `repo_enabled` - -Data type: `Integer[0,1]` - -enables/disables the repository - -Default value: `1` - diff --git a/Rakefile b/Rakefile index c897f4b..f92f051 100644 --- a/Rakefile +++ b/Rakefile @@ -24,10 +24,6 @@ end begin require 'voxpupuli/release/rake_tasks' rescue LoadError - # voxpupuli-release not present -else - GCGConfig.user = 'voxpupuli' - GCGConfig.project = 'puppet-hashi_stack' end desc "Run main 'test' task and report merged results to coveralls" @@ -41,4 +37,36 @@ task test_with_coveralls: [:test] do end end +desc 'Generate REFERENCE.md' +task :reference, [:debug, :backtrace] do |t, args| + patterns = '' + Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace]) +end + +begin + require 'github_changelog_generator/task' + require 'puppet_blacksmith' + GitHubChangelogGenerator::RakeTask.new :changelog do |config| + metadata = Blacksmith::Modulefile.new + config.future_release = "v#{metadata.version}" if metadata.version =~ /^\d+\.\d+.\d+$/ + config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module." + config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog} + config.user = 'voxpupuli' + config.project = metadata.metadata['name'] + end + + # Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715 + require 'rbconfig' + if RbConfig::CONFIG['host_os'] =~ /linux/ + task :changelog do + puts 'Fixing line endings...' + changelog_file = File.join(__dir__, 'CHANGELOG.md') + changelog_txt = File.read(changelog_file) + new_contents = changelog_txt.gsub(%r{\r\n}, "\n") + File.open(changelog_file, "w") {|file| file.puts new_contents } + end + end + +rescue LoadError +end # vim: syntax=ruby diff --git a/manifests/repo.pp b/manifests/repo.pp index 58c6a92..0683ed0 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -18,31 +18,22 @@ # @param key_source The location of an existing GPG key file to copy. # @param description Repository description # @param rpm_base Base URL for the Yum repository -# @param repo_gpgcheck enables gpg validation of packages from the repo -# @param repo_enabled enables/disables the repository -# class hashi_stack::repo ( Optional[Integer] $priority = undef, String $proxy = 'absent', - String $key_id = '798AEC654E5C15428C8E42EEAA16FCBCA621E701', + String $key_id = 'E8A032E094D8EB4EA189D270DA418C88A3219F7B', Stdlib::HTTPSUrl $key_source = 'https://apt.releases.hashicorp.com/gpg', String $description = 'HashiCorp package repository.', String $rpm_base = 'https://rpm.releases.hashicorp.com', Integer[0,1] $repo_gpgcheck = 0, - Integer[0,1] $repo_enabled = 1, ) { - $arch = $facts['os']['architecture'] ? { - 'aarch64' => 'arm64', # 'aarch64' is official, but Hashicorp uses 'arm64' - default => $facts['os']['architecture'], - } - case $facts['os']['family'] { 'Debian': { include apt apt::source { 'HashiCorp': ensure => 'present', - architecture => $arch, + architecture => 'amd64', comment => $description, location => 'https://apt.releases.hashicorp.com', repos => 'main', @@ -64,7 +55,7 @@ class hashi_stack::repo ( gpgcheck => 1, gpgkey => $key_source, repo_gpgcheck => $repo_gpgcheck, - enabled => $repo_enabled, + enabled => 1, proxy => $proxy, priority => $priority, } diff --git a/metadata.json b/metadata.json index 6b66a0a..4bb4b03 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppet-hashi_stack", - "version": "3.3.1-rc0", + "version": "2.1.0", "author": "Vox Pupuli", "summary": "This module contains shared code for various HashiCorp modules", "license": "AGPL-3.0", @@ -10,11 +10,11 @@ "dependencies": [ { "name": "puppetlabs-stdlib", - "version_requirement": ">= 5.1.0 < 10.0.0" + "version_requirement": ">= 5.1.0 < 9.0.0" }, { "name": "puppetlabs/apt", - "version_requirement": ">= 6.1.0 < 11.0.0" + "version_requirement": ">= 6.1.0 < 10.0.0" } ], "operatingsystem_support": [ @@ -22,65 +22,34 @@ "operatingsystem": "RedHat", "operatingsystemrelease": [ "7", - "8", - "9" - ] - }, - { - "operatingsystem": "OracleLinux", - "operatingsystemrelease": [ - "8", - "9" - ] - }, - { - "operatingsystem": "AlmaLinux", - "operatingsystemrelease": [ - "8", - "9" - ] - }, - { - "operatingsystem": "Rocky", - "operatingsystemrelease": [ - "8", - "9" + "8" ] }, { "operatingsystem": "CentOS", "operatingsystemrelease": [ "7", - "8", - "9" + "8" ] }, { "operatingsystem": "Debian", "operatingsystemrelease": [ - "10", - "11", - "12" + "10" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "18.04", - "20.04", - "22.04", - "24.04" + "20.04" ] } ], "requirements": [ { "name": "puppet", - "version_requirement": ">= 7.0.0 < 9.0.0" - }, - { - "name": "openvox", - "version_requirement": ">= 7.0.0 < 9.0.0" + "version_requirement": ">= 6.1.0 < 8.0.0" } ] } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 58c9b66..4d617f3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,16 +9,9 @@ ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__)) require 'voxpupuli/test/spec_helper' -RSpec.configure do |c| - c.facterdb_string_keys = false -end - -add_mocked_facts! - if File.exist?(File.join(__dir__, 'default_module_facts.yml')) facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml'))) facts&.each do |name, value| add_custom_fact name.to_sym, value end end -Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f }