Skip to content

Commit

Permalink
Merge branch 'main' into asenci/instances-hash
Browse files Browse the repository at this point in the history
# Conflicts:
#	manifests/integrations/http_check.pp
#	templates/agent-conf.d/http_check.yaml.erb
  • Loading branch information
asenci committed Jan 10, 2022
2 parents c87d13c + afc6a51 commit 76a7c3f
Show file tree
Hide file tree
Showing 29 changed files with 967 additions and 324 deletions.
10 changes: 9 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ jobs:
RUBY_VERSION: '2.6.3'
PUPPET_VERSION: '6.5.0'

specs-ruby26-puppet79:
<<: *specs
environment:
STRICT_VARIABLES: 'yes'
RUBY_VERSION: '2.6.3'
PUPPET_VERSION: '7.9.0'

specs-ruby25-puppet65-windows: &windows-specs
executor:
name: win/default # Comes with ruby 2.6, which is not supported on Windows as of puppet 6.10.1
Expand All @@ -233,7 +240,7 @@ jobs:
choco install ruby --allow-downgrade -y --version 2.5.3.101 # Keep version in sync with next command!
export PATH=/c/tools/ruby25/bin:$PATH # Make Ruby 2.5 take precedence over the pre-installed 2.6
ruby --version
choco install msys2 --allow-downgrade -y --version 20200903.0.0
choco install msys2 --allow-downgrade -y --version 20210604.0.0
ridk.cmd exec pacman -S --noconfirm --needed base-devel mingw-w64-x86_64-toolchain
gem install bundler -v 1.17.3
rm Gemfile.lock && bundle install --path .bundle
Expand Down Expand Up @@ -317,5 +324,6 @@ workflows:
- specs-ruby25-puppet65-windows
- specs-ruby26-puppet60
- specs-ruby26-puppet65
- specs-ruby26-puppet79
- verify-gemfile-lock-dependencies
- kitchen-tests
4 changes: 3 additions & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ fixtures:
forge_modules:
yumrepo_core: "puppetlabs/yumrepo_core"
powershell: "puppetlabs/powershell"
zypprepo: "puppet/zypprepo"
zypprepo:
repo: "puppet/zypprepo"
ref: "3.1.0"
symlinks:
custom_datadog: "#{source_dir}/spec/custom_fixtures/custom_datadog"
datadog_agent: "#{source_dir}"
46 changes: 46 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'ruby' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually
- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
Changes
=======

# 3.14.0 / 2021-09-29

* [FEATURE] Support Raspbian as debian-based systems ([#719][]) (Thanks [@Mstrodl])
* [FEATURE] Add support for security-agent config ([#706][]) (Thanks [@florusboth])
* [BUGFIX] Fix "Unable to locate package datadog-signing-keys" error on new installs ([#721][])

# 3.13.0 / 2021-08-11

* [CHORE] Run `bundle update` on Ruby 2.5.1 ([#712][])
* [FEATURE] Install datadog-signing-keys on Debian based platforms ([#709][])
* [BUGFIX] Do not add process integration configuration file if not configured ([#703][]) (Thanks [@yanjunding][])
* [FEATURE] add support for `min_collection_interval` for HTTP check ([#699][]) (Thanks [@yanjunding][])
* [FEATURE] Improvements for APT keys management ([#698][], [#700][], [#701][] and [#714][])
* [FEATURE] Include 'datadog_agent' class in the catalog when using the generic integration ([#697][]) (Thanks [@stantona][])
* [BUGFIX] Update `excluded_interface_re` type to String ([#696][]) (Thanks [@florusboth][])

# 3.12.0 / 2021-05-06

* [FEATURE] Support for NPM on Windows [#688][]
* [FEATURE] Enable repo_gpgcheck for RPM repositories by default [#693][]
* [FEATURE] Add the 'current' gpg key, only use 1 gpgkey on suse < 15 [#687][]
* [BUGFIX] Fix typo in network.yaml.erb [#690][] (Thanks [@florusboth][])
* [BUGFIX] Fix tool_version being unknown in install_info [#692][]

# 3.11.0 / 2021-03-01

* [FEATURE] Add support for SUSE distros [#682][]
Expand Down Expand Up @@ -824,6 +848,24 @@ Please read the [docs]() for more details.
[#681]: https://github.com/DataDog/puppet-datadog-agent/issues/681
[#682]: https://github.com/DataDog/puppet-datadog-agent/issues/682
[#686]: https://github.com/DataDog/puppet-datadog-agent/issues/686
[#687]: https://github.com/DataDog/puppet-datadog-agent/issues/687
[#688]: https://github.com/DataDog/puppet-datadog-agent/issues/688
[#690]: https://github.com/DataDog/puppet-datadog-agent/issues/690
[#692]: https://github.com/DataDog/puppet-datadog-agent/issues/692
[#693]: https://github.com/DataDog/puppet-datadog-agent/issues/693
[#696]: https://github.com/DataDog/puppet-datadog-agent/issues/696
[#697]: https://github.com/DataDog/puppet-datadog-agent/issues/697
[#698]: https://github.com/DataDog/puppet-datadog-agent/issues/698
[#699]: https://github.com/DataDog/puppet-datadog-agent/issues/699
[#700]: https://github.com/DataDog/puppet-datadog-agent/issues/700
[#701]: https://github.com/DataDog/puppet-datadog-agent/issues/701
[#703]: https://github.com/DataDog/puppet-datadog-agent/issues/703
[#706]: https://github.com/DataDog/puppet-datadog-agent/issues/706
[#709]: https://github.com/DataDog/puppet-datadog-agent/issues/709
[#712]: https://github.com/DataDog/puppet-datadog-agent/issues/712
[#714]: https://github.com/DataDog/puppet-datadog-agent/issues/714
[#719]: https://github.com/DataDog/puppet-datadog-agent/issues/719
[#721]: https://github.com/DataDog/puppet-datadog-agent/issues/721
[@Aramack]: https://github.com/Aramack
[@BIAndrews]: https://github.com/BIAndrews
[@ChannoneArif-nbcuni]: https://github.com/ChannoneArif-nbcuni
Expand All @@ -833,6 +875,7 @@ Please read the [docs]() for more details.
[@IanCrouch]: https://github.com/IanCrouch
[@LeoCavaille]: https://github.com/LeoCavaille
[@MartinDelta]: https://github.com/MartinDelta
[@Mstrodl]: https://github.com/Mstrodl
[@NoodlesNZ]: https://github.com/NoodlesNZ
[@aaron-miller]: https://github.com/aaron-miller
[@aepod]: https://github.com/aepod
Expand Down Expand Up @@ -875,6 +918,7 @@ Please read the [docs]() for more details.
[@ewansteele]: https://github.com/ewansteele
[@ffleming]: https://github.com/ffleming
[@ffrants]: https://github.com/ffrants
[@florusboth]: https://github.com/florusboth
[@flyinbutrs]: https://github.com/flyinbutrs
[@flyinprogrammer]: https://github.com/flyinprogrammer
[@fr3nd]: https://github.com/fr3nd
Expand Down Expand Up @@ -933,6 +977,7 @@ Please read the [docs]() for more details.
[@turnopil]: https://github.com/turnopil
[@tuxinaut]: https://github.com/tuxinaut
[@vaisingh]: https://github.com/vaisingh
[@yanjunding]: https://github.com/yanjunding
[@yrcjaya]: https://github.com/yrcjaya
[@zabacad]: https://github.com/zabacad
[@zickzackv]: https://github.com/zickzackv
Expand Down
41 changes: 22 additions & 19 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
source "https://rubygems.org"

# Puppet 4.10.2 is the minimum version we support on Windows due to https://tickets.puppetlabs.com/browse/PUP-7383
# On Linux we support down to 4.6
gem "puppet", "~> #{ENV.fetch('PUPPET_VERSION', '4.10.2')}"
ruby_version = Gem::Version.new(RUBY_VERSION.dup)

ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
# Each version of Puppet recommends a specific version of Ruby. Try to fetch the Puppet version that
# matches our Ruby (unless PUPPET_VERSION is defined).
matching_puppet_version = ruby_version > Gem::Version.new('2.5') ? (ruby_version > Gem::Version.new('2.7') ? '7.0.0' : '6.0.1') : '4.10.2'
gem "puppet", "~> #{ENV.fetch('PUPPET_VERSION', matching_puppet_version)}"

ruby_version_segments = ruby_version.segments
minor_version = ruby_version_segments[0..1].join('.')

group :development do
gem "rake", "~> 12.3.3" if RUBY_VERSION < '2.6.0' # last version for ruby < 2.6
gem "xmlrpc" if RUBY_VERSION >= '2.3'
gem "rake", "~> 12.3.3" if ruby_version < Gem::Version.new('2.6.0') # last version for ruby < 2.6
gem "xmlrpc" if ruby_version >= Gem::Version.new('2.3')
gem "ruby-pwsh", '~> 0.3.0', platforms: [:mswin, :mingw, :x64_mingw]
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "fast_gettext", '1.1.0', require: false if ruby_version < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if ruby_version >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if ruby_version < Gem::Version.new('2.0.0')
gem "json", '= 1.8.1', require: false if ruby_version == Gem::Version.new('2.1.9')
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(ruby_version)
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(ruby_version)
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "librarian-puppet"
gem "kitchen-puppet"
gem "kitchen-docker"
gem "kitchen-verifier-serverspec"
gem "mixlib-shellout", "~> 2.2.7", platforms: [:ruby]
gem "rubocop-i18n", "~> 1.2.0"
gem "rubocop-rspec", "~> 1.16.0"

if RUBY_VERSION >= '2.3'
if ruby_version >= Gem::Version.new('2.3')
gem "test-kitchen", '~> 2.5.4'
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
else
gem "test-kitchen", '~> 1.16.0'
gem "puppetlabs_spec_helper", "~> 2.14.1"
Expand All @@ -38,8 +43,6 @@ group :development do
gem "puppet-syntax", "~> 2.5.0"
gem "rspec-puppet", "~> 2.6.9"
gem "rubocop", "~> 0.49.1"
gem "rubocop-i18n", "~> 1.2.0"
gem "rubocop-rspec", "~> 1.16.0"
gem "artifactory", "~> 2.8.2"
end
end
Loading

0 comments on commit 76a7c3f

Please sign in to comment.