Showing with 29 additions and 9 deletions.
  1. +0 −2 .github/workflows/auto_release.yml
  2. +2 −2 .github/workflows/release.yml
  3. +1 −0 .github/workflows/spec.yml
  4. +1 −0 .pdkignore
  5. +9 −1 CHANGELOG.md
  6. +1 −1 lib/facter/haproxy_version.rb
  7. +3 −3 metadata.json
  8. +12 −0 spec/spec_helper.rb
2 changes: 0 additions & 2 deletions .github/workflows/auto_release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: "Auto release"

on:
schedule:
- cron: '0 3 * * 6'
workflow_dispatch:

env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
ref: ${{ github.ref }}
clean: true
- name: "PDK Build"
uses: docker://puppet/pdk:2.1.0.0
uses: docker://puppet/pdk:nightly
with:
args: 'build'
- name: "Push to Forge"
uses: docker://puppet/pdk:2.1.0.0
uses: docker://puppet/pdk:nightly
with:
args: 'release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force'
1 change: 1 addition & 0 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
env:
BUILDEVENT_FILE: '../buildevents.txt'
PUPPET_GEM_VERSION: ${{ matrix.puppet_version }}
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'

steps:
- run: |
Expand Down
1 change: 1 addition & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/appveyor.yml
/.editorconfig
/.fixtures.yml
/Gemfile
/.gitattributes
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).

## [v6.0.1](https://github.com/puppetlabs/puppetlabs-haproxy/tree/v6.0.1) (2021-05-22)
## [v6.0.2](https://github.com/puppetlabs/puppetlabs-haproxy/tree/v6.0.2) (2021-06-21)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-haproxy/compare/v6.0.1...v6.0.2)

### Fixed

- Fix haproxy\_version fact for versions \>= 2.4.0 [\#486](https://github.com/puppetlabs/puppetlabs-haproxy/pull/486) ([bp85](https://github.com/bp85))

## [v6.0.1](https://github.com/puppetlabs/puppetlabs-haproxy/tree/v6.0.1) (2021-05-24)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-haproxy/compare/v6.0.0...v6.0.1)

Expand Down
2 changes: 1 addition & 1 deletion lib/facter/haproxy_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
haproxy_version_cmd = 'haproxy -v 2>&1'
haproxy_version_result = Facter::Util::Resolution.exec(haproxy_version_cmd)
setcode do
haproxy_version_result.to_s.lines.first.strip.split(%r{HA-Proxy})[1].strip.split(%r{version})[1].strip.split(%r{((\d+\.){2,}\d+).*})[1]
haproxy_version_result.to_s.lines.first.strip.split(%r{HA?.Proxy})[1].strip.split(%r{version})[1].strip.split(%r{((\d+\.){2,}\d+).*})[1]
end
end
end
6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-haproxy",
"version": "6.0.1",
"version": "6.0.2",
"author": "puppetlabs",
"summary": "Configures HAProxy servers and manages the configuration of backend member servers.",
"license": "Apache-2.0",
Expand Down Expand Up @@ -72,6 +72,6 @@
}
],
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
"template-ref": "heads/main-0-ge04486b",
"pdk-version": "2.0.0"
"template-ref": "heads/main-0-g03daa92",
"pdk-version": "2.1.0"
}
12 changes: 12 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@
c.after(:suite) do
RSpec::Puppet::Coverage.report!(0)
end

# Filter backtrace noise
backtrace_exclusion_patterns = [
%r{spec_helper},
%r{gems},
]

if c.respond_to?(:backtrace_exclusion_patterns)
c.backtrace_exclusion_patterns = backtrace_exclusion_patterns
elsif c.respond_to?(:backtrace_clean_patterns)
c.backtrace_clean_patterns = backtrace_exclusion_patterns
end
end

# Ensures that a module is defined
Expand Down