Commit graph

10647 commits

Author SHA1 Message Date
Nikita Mathur
c9ce7af946 Test case added for verifying running of same profile with different versions
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-27 17:45:02 -04:00
Nikita Mathur
28efa42ddf New profile id usage instead of profile_id in dsl
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-27 17:45:02 -04:00
Nikita Mathur
4f7d508fcc Fix build issue
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-27 17:45:02 -04:00
Nikita Mathur
b86ed1343d Fix related to new profile id generation for fetching dependencies in dsl logic
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-27 17:45:02 -04:00
Nikita Mathur
e9e830d3d4 Dsl using dependency with version to fetch dependency
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-27 17:45:02 -04:00
Nikita Mathur
c79c89836c Fix for dependent profiles with same name but different version to run and display
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-27 17:45:02 -04:00
Clinton Wolfe
70dedb3ff4 Use esxi instead of undefined as an unsupported OS to silence 'unknown OS' warnings
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-27 16:15:49 -04:00
Clinton Wolfe
dc8cb4bb39 Add explict /usr/sbin/netstat to mockloader, fixes routingtable tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-27 16:15:49 -04:00
Nikita Mathur
d937b190a9 Pinning minitest to 5.15.0 to fix build issue
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-27 16:15:49 -04:00
Clinton Wolfe
96c72b189a
Merge pull request #6137 from inspec/cw/ruby-3.1-inspec-6
Foreport ruby 3.1 support to inspec-6
2022-06-22 12:37:10 -04:00
jayashrig158
542b9cc246 add ruby test 3.1 in verify pipeline (#5892)
* add ruby test 3.1 in verify pipeline

Signed-off-by: jayashri garud <jgarud@msystechnologies.com>

* updating rubygem to 3.3.3

Signed-off-by: jayashri garud <jgarud@msystechnologies.com>

* Test fixture plugin files for ABI 3.1.0

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Use kwargs to match new calling style for ERB in ruby 2.7 and 3.0

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Allow Date and Time data types, needed for waivers, since safe load is now the default for YAML

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Use Time.parse, not Time.new since the rules tightened for what you can pass the constructor for waiver dates

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add ruby platform debug message to test parallel output

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Conditionalize permitted_classes in inputs yaml_load for <= 3.1.x only

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* In ruby 3.1.0 net/pop3 is no more a default gem and that will require us to add it in Gemfile so trying with the byebug gem which we are bundling already

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* CFINSPEC-166 Updated url fetcher to handle Net::OpenTimeout Exception on Windows

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-14 16:07:08 +05:30
Nikita Mathur
2fd0ccfa4d
Merge pull request #6138 from inspec/nm/parallel-test-fix
Fix Inspec parallel test build issues
2022-06-14 16:06:19 +05:30
Nikita Mathur
6eb5df2e49 Skip parallel exec tests on windows
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-14 15:17:02 +05:30
Nikita Mathur
d8fd959af5 Fix test cases in inspec parallel tests
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-06-14 13:46:34 +05:30
Nikita Mathur
f04a31d822
CFINSPEC-120 inspec parallel feature (#5975)
* Initial commit - Inspec parallel setup

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added dry run option functionality and renamed subcommand

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Runner logic parsing options file and executing cmds

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Validation logic changes for dry run and run commands

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Validator bug fix when using options like --sudo with no value

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* initial commit for using default options

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Logic to not parse empty lines and comments and some cleanup

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Functional test cases added

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Test cases fix and bug fix in validator

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Add logic to append default options passed from cli

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* Add test for default options and extend options-file-1.txt

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* Add comments in options-file-2 and 3

Signed-off-by: Sonu Saha <sonu.saha@progress.com>

* Bug fix and some refactoring

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Changes from pair programming

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Fixed incorrect line no used in dry run validation & added verbose option

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Initial code with parallel gem setup

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Error handling and some changes in parallel running result

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Working spawn and fork implementation; no pipes or error handling

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* CFINSPEC-143 Child status reporter plugin

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Read status from children using pipes; Windows implementation is likely broken

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Linting

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Removed parallel gem and it's code usage

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Erb templating and option file as shell/powershell option added

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added missing raise error in content reading logic

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Adding for the sake of keeping bash file syntax correct

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Switch to select() polling, enabling Windows support; also add a terrible hack to the child-status reporter

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Move child-status reporter into inspec-parallel plugin to reduce pollution

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Rename a bunch of things, remove some instance variables, always validate, and use Inspec::UI exit codes

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Rework validation to be Thor-based; add logic to inject child-status reporter

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Linting

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Refactor parent UI to make it object oriented

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add a prototype 'status' super-reporter

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Improve status UI edge cases, add info to output, make default

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Error handling added when running bash instead of system check

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Daemon run for background process in unix system for parallel runs

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Added logic to cleanup daemon process'

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Review changes for background command name and windows handling

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Error raised with error handling class for options file

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Fix to not intialise ui when background run is opted

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* typo fix in child reporter append logic in validator

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Changes to trap control c and exit gracefully

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Moved ctl c handling code to command class

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Linter fixes

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Error and runner logging added

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* ERB pid option to use child process id for generating result output

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Renamed 38125 to Process.pid for clear notation

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Log path option added for inspec parallel

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Adjust ERB eval

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* STDERR logging added

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Fix of --bg with ui

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Deleting log files if empty and status super reporter to show done

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>

* Docs for InSpec Parallel

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Doc Review

Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>

* Grammar corrections

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

Co-authored-by: Sonu Saha <sonu.saha@progress.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-13 13:58:41 -04:00
Clinton Wolfe
e1ad3ab91f Add inspec-6 branch as release branch
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-13 13:54:28 -04:00
Clinton Wolfe
873b2e1bcf Manual version bump
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-13 13:47:17 -04:00
Clinton Wolfe
e5ddf9ce9d
Merge pull request #6135 from inspec/cw/inspec-6-bump
Bump to InSpec 6
2022-06-13 13:44:07 -04:00
Clinton Wolfe
605df0db86 Remove broken image for Slack badge
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-13 13:41:32 -04:00
Ian Maddaus
80d504e40e
Merge pull request #5977 from inspec/im/template
Update Hugo resource doc archetype
2022-06-12 23:28:52 -04:00
Ian Maddaus
23480ff772 Minor text fixes
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-10 17:53:09 -04:00
Ian Maddaus
22e5d1513e Use shortcodes in text, move shortcodes into inspec subdir
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-10 16:47:46 -04:00
Ian Maddaus
6e53b15267 Update docs readme
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-10 16:47:46 -04:00
Ian Maddaus
f1218c19a4 Update Hugo resource archetype
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-10 16:47:46 -04:00
Chef Expeditor
79d3a6e342 Bump version to 5.18.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-06-10 20:43:59 +00:00
Ian Maddaus
34e0cfd3f6
Merge pull request #6007 from inspec/DK/matchers_review
Dk/matchers rewrite
2022-06-10 16:43:04 -04:00
Ian Maddaus
60f250eee6 Additional changes
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
0685ff603c Typo
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Ian Maddaus
6f5c784043 Update docs-chef-io/content/inspec/matchers.md 2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
92a1909f85 Ian's comments
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
dd24c34888 Update docs-chef-io/content/inspec/matchers.md
Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
de2b1de596 Update docs-chef-io/content/inspec/matchers.md
Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
0e5a1eb138 Some more edits
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
7063a74c61 Ian's comments fixes
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
3feeab14c2 heading changes
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
08397f11c8 Matchers rewrite
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Deepa Kumaraswamy
a020e6babb Rewrite
Signed-off-by: Deepa Kumaraswamy <dkumaras@progress.com>
2022-06-10 15:56:37 -04:00
Chef Expeditor
07107cdcd1 Bump version to 5.18.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-06-09 11:40:22 +00:00
Vasundhara Jagdale
1ab70578dc
Merge pull request #6132 from inspec/vasundhara/fix_lint_error_after_resource_id_merge
Fixed Lint/DuplicateMethods: Method Inspec::Resources::Service#resource_id is defined at both
2022-06-09 11:39:26 +00:00
Vasu1105
62405e261d Fixed Lint/DuplicateMethods: Method Inspec::Resources::Service#resource_id is defined at both
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2022-06-09 16:19:59 +05:30
Chef Expeditor
7da11de098 Bump version to 5.18.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-06-08 21:33:00 +00:00
Clinton Wolfe
29ef063833
Merge pull request #6100 from inspec/ss/fix-processes-on-windows
CFINSPEC-291: Fix `processes` resource to consider processes without `path` on Windows
2022-06-08 17:32:00 -04:00
Chef Expeditor
406636f22a Bump version to 5.18.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-06-08 21:08:29 +00:00
Clinton Wolfe
610e7aacea
Merge pull request #5995 from inspec/vasundhara/sign-profile-binary-format
CFINSPEC-167: Profile Signing Rollup
2022-06-08 17:07:27 -04:00
Clinton Wolfe
97af028ec5 Doc edits for clarification
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-06-08 17:00:24 -04:00
Chef Expeditor
625bb9b0e0 Bump version to 5.17.18 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-06-08 20:19:21 +00:00
Chef Expeditor
293d8e76de Bump version to 5.17.17 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-06-08 20:16:48 +00:00
Clinton Wolfe
4b9cf11096
Merge pull request #6114 from inspec/dependabot/bundler/omnibus/main/berkshelf-8.0.2
Bump berkshelf from 8.0.0 to 8.0.2 in /omnibus
2022-06-08 16:15:12 -04:00
Chef Expeditor
980fabf35c Bump version to 5.17.16 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2022-06-08 20:14:48 +00:00
Clinton Wolfe
6385ea9f74
Merge pull request #6126 from inspec/vasundhara/group_2_resource_id
Adds resource_id to group 2  resources
2022-06-08 16:14:45 -04:00