[circlci] Add tests for Chef 16.5.77
Added chef 16.5 to kitchen tests
Add chef 16 docker kitchen tests
Add chef 16 spec tests
Remove some kitchen tests to not hit max open files limit
Refactor a bit circle CI test, split kitchen tests from style check
MODIFY
.circleci/config.yml
.circleci/config.yml
version: 2
jobs:
- full-suite:
+ kitchen-docker-tests:
machine: true
environment:
KITCHEN_LOCAL_YAML: kitchen.docker.yml
+ RUBY_VERSION: '2.6.3' # ruby used to invoke kitchen, not the version used in the tests
steps:
- checkout
- run:
- name: Set Ruby version to 2.6.3
+ name: Set Ruby version
command: |
- rvm install 2.6.3
- echo . $(rvm 2.6.3 do rvm env --path) >> $BASH_ENV
+ echo "Using $RUBY_VERSION"
+ rvm install $RUBY_VERSION
+ echo . $(rvm $RUBY_VERSION do rvm env --path) >> $BASH_ENV
- run:
name: Install bundler
command: gem install bundler:1.17.3
- - run:
- name: Check bundler version
- command: bundle --version
- run:
name: Install dependencies with bundler
command: bundle install --path .bundle
- - run:
- name: Showing gems versions in bundle
- command: bundle list
- - run:
- name: Run specs
- command: bundle exec rake
- run:
name: Execute Kitchen tests
command: bundle exec rake circle
no_output_timeout: 900
- specs-ruby2.6.3-chef14.10.9: &specs
+ style:
machine: true
environment:
- KITCHEN_LOCAL_YAML: kitchen.docker.yml
- CHEF_VERSION: '14.10.9'
+ CHEF_VERSION: '16.5.77'
RUBY_VERSION: '2.6.3'
+ steps:
+ - checkout
+ - run:
+ name: Set Ruby version
+ command: |
+ echo "Using $RUBY_VERSION"
+ rvm install $RUBY_VERSION
+ echo . $(rvm $RUBY_VERSION do rvm env --path) >> $BASH_ENV
+ - run:
+ name: Install bundler
+ command: gem install bundler:1.17.3
+ - run:
+ name: Check bundler version
+ command: bundle --version
+ - run:
+ name: Install dependencies with bundler without Gemfile.lock
+ command: |
+ rm Gemfile.lock
+ bundle install --path .bundle --without=development
+ - run:
+ name: Showing gems versions in bundle
+ command: bundle list
+ - run:
+ name: Execute style check
+ command: bundle exec rake style
+
+ specs-base: &specs
+ machine: true
+ environment:
+ CHEF_VERSION: 'needs-to-be-specified'
+ RUBY_VERSION: 'needs-to-be-specified'
steps:
- checkout
- run:
@@ -63,24 +86,33 @@ jobs:
name: Run specs
command: bundle exec rake spec
+ specs-ruby2.6.3-chef16.5.77:
+ <<: *specs
+ environment:
+ CHEF_VERSION: '16.5.77'
+ RUBY_VERSION: '2.6.3'
+
+ specs-ruby2.6.3-chef14.10.9:
+ <<: *specs
+ environment:
+ CHEF_VERSION: '14.10.9'
+ RUBY_VERSION: '2.6.3'
+
specs-ruby2.5.1-chef14.10.9:
<<: *specs
environment:
- KITCHEN_LOCAL_YAML: kitchen.docker.yml
CHEF_VERSION: '14.10.9'
RUBY_VERSION: '2.5.1'
specs-ruby2.4.3-chef13.12.14:
<<: *specs
environment:
- KITCHEN_LOCAL_YAML: kitchen.docker.yml
CHEF_VERSION: '13.12.14'
RUBY_VERSION: '2.4.3'
specs-ruby2.3.6-chef13.12.14:
<<: *specs
environment:
- KITCHEN_LOCAL_YAML: kitchen.docker.yml
CHEF_VERSION: '13.12.14'
RUBY_VERSION: '2.3.6'
@@ -88,8 +120,10 @@ workflows:
version: 2
build_and_test:
jobs:
+ - kitchen-docker-tests
+ - style
+ - specs-ruby2.6.3-chef16.5.77
- specs-ruby2.6.3-chef14.10.9
- specs-ruby2.5.1-chef14.10.9
- specs-ruby2.4.3-chef13.12.14
- specs-ruby2.3.6-chef13.12.14
- - full-suite

MODIFY
kitchen.docker.yml
kitchen.docker.yml
@@ -25,6 +25,11 @@ platforms:
require_chef_omnibus: 14.12
image: 'datadog/docker-library:chef_kitchen_systemd_centos_7'
run_command: /root/start.sh
+ - name: centos-7.7
+ driver_config:
+ require_chef_omnibus: 16.5
+ image: 'datadog/docker-library:chef_kitchen_systemd_centos_7'
+ run_command: /root/start.sh
- name: debian-8.11
driver_config:
require_chef_omnibus: 14.12

MODIFY
kitchen.yml
kitchen.yml
@@ -9,7 +9,6 @@ platforms:
# fedora-20 needs kitchen-docker 1.7.0, but other bugs prevent that version from being used.
<% test_platforms = %w(
amazonlinux-2
- ubuntu-12.04
ubuntu-14.04
ubuntu-16.04
centos-5.11
@@ -19,9 +18,9 @@ platforms:
)
chef_versions = %w(
12.7.2
- 13.11.3
14
15
+ 16.5
)
test_platforms.product(chef_versions).each do |platform_version, chef_version|
@@ -266,37 +265,6 @@ suites:
- kitchen
- sink
-- name: datadog_fluentd
- run_list:
- - recipe[datadog::fluentd]
- attributes:
- datadog:
- <<: *DATADOG
- fluentd:
- instances:
- - monitor_agent_url: http://localhost.com:24220/api/plugins.json
- plugin_ids:
- - api
- - plugin
- tags:
- - kitchen
- - sink
-
-- name: datadog_haproxy
- run_list:
- - recipe[datadog::haproxy]
- attributes:
- datadog:
- <<: *DATADOG
- haproxy:
- instances:
- - username: admin
- password: sekret
- url: http://localhost:22002/status
- status_check: false
- collect_aggregates_only: true
- collect_status_metrics: true
-
- name: datadog_http_check
run_list:
- recipe[datadog::http_check]
@@ -350,17 +318,6 @@ suites:
bean_regex:
- regex_on_excluded_bean
-- name: datadog_mongo
- run_list:
- - recipe[datadog::mongo]
- attributes:
- datadog:
- <<: *DATADOG
- mongo:
- instances:
- - host: localhost
- port: 27017
-
- name: datadog_mysql
run_list:
- recipe[datadog::mysql]
@@ -577,48 +534,6 @@ suites:
instances:
- url: http://localhost:22222
-- name: datadog_postfix
- run_list:
- - recipe[sudo]
- - recipe[datadog::postfix]
- attributes:
- authorization:
- sudo:
- include_sudoers_d: true
- datadog:
- <<: *DATADOG
- postfix:
- instances:
- - directory: "/var/spool/postfix"
- queues:
- - incoming
- - active
- - deferred
- tags:
- - prod
- - postfix_core
- - directory: "/var/spool/postfix"
- queues:
- - bounce
- tags:
- - test
-
-- name: datadog_vault
- run_list:
- - recipe[datadog::vault]
- attributes:
- datadog:
- <<: *DATADOG
- vault:
- instances:
- - api_url: http://localhost:8200/v1
- detect_leader: false
- skip_proxy: false
- ssl_verify: true
- ssl_ca_cert: /path/to/cert.crt
- tags: ['_default']
- timeout: 20
-
# Integrations test of the datadog_integration resource
- name: dd_integration_resource
run_list:

[circlci] Add tests for Chef 16.5.77 (#741)

- Added chef 16.5 to kitchen tests
- Add chef 16 docker kitchen tests
- Add chef 16 spec tests
- Remove some kitchen tests to not hit max open files limit
- Refactor a bit circle CI test, split kitchen tests from style check