Commit graph

8344 commits

Author SHA1 Message Date
James Stocks
b3e2a4a46b
Merge pull request #5019 from james-stocks/js/release_doc
Include homebrew-chef in release process
2020-05-13 14:35:56 +01:00
Clinton Wolfe
8ec249e0cc Copy in reporter message size limiter code from core reporter base
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-12 17:04:19 -04:00
Clinton Wolfe
36069943c4 Add ability to generate reporter plugins using inspec init
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-12 17:00:44 -04:00
Chef Expeditor
6b45777e81 Bump version to 4.18.114 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2020-05-11 23:09:52 +00:00
Bryan McLellan
4e14a7d270
Merge pull request #5020 from inspec/no_rubygems_bundler
No longer need to include rubygems or bundler software dep
2020-05-11 19:09:35 -04:00
Bryan McLellan
356e67720e Remove comment about the omnibus lock in overrides file
The comment about running `bundle exec rake dependencies:update_omnibus_gemfile_lock`
is copy-pasta from chef/chef. The inspec project does not commit any
Gemfile.lock files, including omnibus/Gemfile.lock, due to
`Gemfile.lock` being in the `.gitignore` file.

Signed-off-by: Bryan McLellan <btm@loftninjas.org>
2020-05-11 18:34:45 -04:00
James Stocks
10509255ff
Merge pull request #5016 from james-stocks/js/issue_4705
Remove Windows skips from test/functional/inspec_exec_jsonmin_test.rb
2020-05-11 12:04:36 +01:00
tyler-ball
0dd05af06e No longer need to include rubygems or bundler software dep
Recent versions of Ruby have included Rubygems and Bundler, which they
did not always do. We also recently fixed some issues in Appbundler so
these software dependencies are no longer needed.

Signed-off-by: tyler-ball <tball@chef.io>
2020-05-08 16:40:51 -07:00
James Stocks
ee6404b9e1 Include homebrew-chef in release process
Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-08 09:09:23 +01:00
Clinton Wolfe
ee095a244a Soften the exception to a warning when the input is not parseable
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-07 10:47:57 -04:00
James Stocks
ba99226baf Remove TODO Windows skip
I removed the skip to see what would break, and on my Windows laptop
these tests pass OK. The TODO didn't explain what wasn't applicable to
Windows, so I'm just going to remove it.

Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-07 14:01:32 +01:00
James Stocks
1510ff1078 Remove Windows skip from test/functional/inspec_exec_jsonmin_test.rb
Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-07 13:16:22 +01:00
Chef Expeditor
caa6a300bc Bump version to 4.18.113 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2020-05-07 11:54:51 +00:00
James Stocks
2103b52dbe
Merge pull request #4994 from james-stocks/js/json
Reporter options to truncate message and suppress stacktrace
2020-05-07 12:54:34 +01:00
Clinton Wolfe
12f3f313cb Don't try to test JSON input under powershell
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-06 16:33:50 -04:00
James Stocks
1d67349214 Do not inject config to base reporter
The base reporter class should access the InSpec config cache, instead of the runner needing to inject config into the base reporter

Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-06 15:24:15 +01:00
Chef Expeditor
12b41fc183 Bump version to 4.18.112 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2020-05-06 10:50:57 +00:00
Nick Schwaderer
d26ed5a8a7
Merge pull request #4993 from inspec/ns/updates_readme_to_clarify_running_inspec_local
Updates README.md to clarify running InSpec local
2020-05-06 11:50:41 +01:00
Nick Schwaderer
286bb7c58a Puts together correct version of README
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-05-06 10:58:59 +01:00
Nick Schwaderer
85f76a8370 Updates README.md to clarify running InSpec local
When this part of the README was updated five years ago ( b58a4b3f43 ), the executable was to be found in `bin/inspec`. It has since been extracted to `inspec-bin/bin/inspec`.

This current phrasing could cause some confusion as a user might actually run `bundle install` from their root and try to then run `bin/inspec`.

This commit clarifies that you need to first `cd` down into `inspec-bin`

Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-05-06 10:58:59 +01:00
Chef Expeditor
52c3718165 Executed '.expeditor/update_dockerfile.sh'
Obvious fix; these changes are the result of automation not creative thinking.
2020-05-06 09:05:21 +00:00
Clinton Wolfe
726a111dc1 Merge branch 'cw/reporters-as-plugins' of github.com:inspec/inspec into cw/reporters-as-plugins 2020-05-05 18:38:40 -04:00
Clinton Wolfe
849bd90930 Parse CLI inputs as booleans
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 18:17:40 -04:00
Clinton Wolfe
786e3728d7 Failing tests for #4799
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 18:09:11 -04:00
Clinton Wolfe
970f583764 Tighten up tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 17:59:50 -04:00
Clinton Wolfe
acfda5a735 Clarify names of examples and a method
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 17:59:20 -04:00
Clinton Wolfe
e8d80dd3cd Update docs
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

Linting

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 17:37:23 -04:00
Clinton Wolfe
5e69e3bab6 Allow complex inputs on CLI
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 17:37:23 -04:00
Clinton Wolfe
c683c4d64d Failing test cases for 4963
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 17:37:23 -04:00
Clinton Wolfe
d9f2cdb171 Fix for #4977 by adding a cleanup function for CLI inputs
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 17:37:23 -04:00
Clinton Wolfe
824018efa3 Failing test cases for #4977
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 17:37:23 -04:00
Mary Jinglewski
52dbabc778 Copyediting
Signed-off-by: Mary Jinglewski <mjinglewski@chef.io>
2020-05-05 15:19:19 -04:00
Clinton Wolfe
47baa59ed8 Add comment tracking when reporters will migrate
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 16:51:31 +01:00
Clinton Wolfe
5accb27224 Linting, and a thinko
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 16:51:31 +01:00
Clinton Wolfe
9c1dbfb5f3 Add docs for reporter plugins
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 16:51:31 +01:00
Clinton Wolfe
5a7a48bb62 Basics of a working reporter plugin system
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 16:51:31 +01:00
Chef Expeditor
d9e5b65e3d Bump version to 4.18.111 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2020-05-05 10:28:20 +00:00
Nick Schwaderer
87d7978340
Merge pull request #5001 from inspec/ns/investigate_waivers_and_namespace_clashing
Allows input and control to have the same name
2020-05-05 11:28:03 +01:00
Nick Schwaderer
a1129f9efc Allows input and control to have the same name
In https://github.com/inspec/inspec/issues/4936 the issue was reported that naming an input the same as a control caused an unexpected failure.

In that particular case, the naming was a result of a pre-waivers workaround which is no longer necessary, but ultimately a breakage of that name clash is an unexpected occurrance.

Due to how inputs are named and registered, `__apply_waivers` thinks that an object is a waiver that is not a waiver and tries to process it. On the micro level, it breaks when trying to pass a variable to a string as if it were a Hash.

It is imperative that we preserve 100% of the current featureset, pass our tests, and fix this edge case along with new test coverage for the failure.

This PR updates the code to do a slightly more elegant and small ‘waiver check’ to stop the namespace clash from breaking our code.

Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-05-05 10:00:19 +01:00
Chef Expeditor
3616ac21dc Bump version to 4.18.110 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2020-05-04 16:01:32 +00:00
James Stocks
b22e97de5c
Merge pull request #5010 from devopsdina/automate-reporter-json
Updating automate reporter example config to valid json
2020-05-04 17:01:16 +01:00
Clinton Wolfe
4c3a0aa4d7 Add comment tracking when reporters will migrate
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-04 11:52:17 -04:00
James Stocks
69fb6e0782 Move reporter option handling to base
They don't need to be json specific, they should apply to any reporter if the user has chosen these settings.

Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-04 15:24:50 +01:00
James Stocks
ae66aee2b2 (WIP) Reporter options to truncate message and suppress stacktrace
TODO: Option names are not JSON specific but only json reporter has been implemented.

Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-04 15:24:50 +01:00
James Stocks
5b0fdfec89
Merge pull request #5009 from james-stocks/js/windows_skip
Push Windows test skipping for 2 more months
2020-05-04 15:24:23 +01:00
James Stocks
e4fd110ff4 Push Windows test skipping for 2 more months
There are open issues for the failng cases and they are in our priority list.

https://github.com/inspec/inspec/issues?q=is%3Aopen+label%3A%22Aspect%3A+Testing%22+label%3A%22Platform%3A+Windows%22

Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-04 14:55:51 +01:00
Clinton Wolfe
4cb613400f Advance windows test skip timebomb to beginning of 3rd quarter 2020
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-02 14:08:26 -04:00
Clinton Wolfe
510c7d847d Linting, and a thinko
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-02 14:04:55 -04:00
Clinton Wolfe
8f7ecbb503 Add docs for reporter plugins
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-02 00:23:41 -04:00
Clinton Wolfe
63d95b6b6b Basics of a working reporter plugin system
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-01 23:48:05 -04:00