Commit graph

4392 commits

Author SHA1 Message Date
Clinton Wolfe
cbf57c3905 Use default command timeout value if timeout is 0
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-04-08 14:53:53 -04:00
Chef Expeditor
e8e5d8eb6f Bump version to 4.31.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-04-07 13:02:12 +00:00
Clinton Wolfe
924ecd367f
Merge pull request #5445 from inspec/cw/add-docker-for-windows
Add --docker-url CLI option
2021-04-07 09:00:37 -04:00
Chef Expeditor
43c9fb5bd4 Bump version to 4.30.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-04-07 12:51:22 +00:00
Clinton Wolfe
fa41586910
Merge pull request #5446 from inspec/nm/fix-input-hash-access
Bug fix for loading hashmap inputs consistently
2021-04-07 08:49:53 -04:00
Chef Expeditor
e348f8ad3f Bump version to 4.30.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-04-07 12:44:47 +00:00
Nikita Mathur
094293b01d Refactored logic to enable hash indifference in all input types
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-05 16:10:55 +05:30
Nikita Mathur
ec30fc3d4e Hash with indifference changes for inputs used via runner api
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-05 14:41:35 +05:30
Chef Expeditor
7496992c9c Bump version to 4.30.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-04-05 02:26:32 +00:00
Clinton Wolfe
8286ec8072
Merge pull request #5443 from inspec/cw/timeouts
Add timeout option to command resource
2021-04-04 22:25:09 -04:00
Clinton Wolfe
6ff6b9634a Add --docker-url CLI option
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-04-04 21:50:41 -04:00
Chef Expeditor
4fa55ebe71 Bump version to 4.29.5 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-04-05 01:35:36 +00:00
Nikita Mathur
a55b083b0a Improvements in various descriptions and a better way to check for hash type
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-03-31 12:35:13 +05:30
Nikita Mathur
c0b213c46a Bug fix for loading hashmap inputs consistently from external and metadata file
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-03-31 11:42:54 +05:30
Clinton Wolfe
81305d3270 linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-03-29 21:48:41 -04:00
Clinton Wolfe
e5b74b5760 Make CLI option take precedence over DSL option if it is nondefault
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-03-29 21:46:25 -04:00
Clinton Wolfe
35b0081c2c Apply suggested fix to maintain SSH connection
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-03-29 21:46:25 -04:00
Clinton Wolfe
6d7f5a240b Convert minutes to seconds for consistent interface
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-03-29 21:46:25 -04:00
James Stocks
9cc9090225 Add command-timeout option
Allow commands to have a timeout, set in minutes. This is considered an emergency mechanism to stop CI being halted indefinitely. If a test inherently needs to pass or fail based on a timeout, this should be scripted into the command string instead.

It can be set for a command resource, like:

```
  describe command('sleep 100', timeout: 1) do
    its('exit_status') { should cmp 0 }
  end
```

It can also be set as a new option `command-timeout`.
A timeout set on a `command` resource takes precedence over the `command-timeout` option.

If no timeout is set at all, a command will default to timing out after 1 hour

Signed-off-by: James Stocks <jstocks@chef.io>
2021-03-29 21:46:25 -04:00
Chef Expeditor
86128f5557 Bump version to 4.29.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-25 19:24:42 +00:00
Vasu1105
a2d3218536 Disable rubocop for begin block
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-25 22:00:12 +05:30
Vasu1105
abde524470 Fixed lint and added code comments
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-25 15:50:23 +05:30
Vasu1105
9af59c2164 Fixes #5369 the FilterTable::ExceptionCatcher error and now shows exact exception message
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-25 15:50:23 +05:30
Vasu1105
8a77b740db Fixes deprecation warning messages for respond_to? method
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-25 15:50:22 +05:30
Chef Expeditor
3091f5d6f0 Bump version to 4.29.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-24 19:14:37 +00:00
Chef Expeditor
001a4d16db Bump version to 4.29.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-24 02:47:24 +00:00
Nikita Mathur
d9bb2649e6 Code refactoring changes for fix #5233
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-03-23 16:20:47 +05:30
Nikita Mathur
d673e840a3 Fix for executing git profiles with default branch not just master
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-03-23 16:20:47 +05:30
Chef Expeditor
8c93d81df4 Bump version to 4.29.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-22 20:40:16 +00:00
Chef Expeditor
9fc1364c07 Bump version to 4.29.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-19 14:26:16 +00:00
Clinton Wolfe
f1e118cbaa
Merge pull request #5430 from issue-3181-json-reporter-passthrough-data 2021-03-19 10:24:22 -04:00
Chef Expeditor
55075c294c Bump version to 4.28.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-19 14:21:28 +00:00
Clinton Wolfe
3038ffa807
Merge pull request #5435 from collinmcneese/profile_init 2021-03-19 10:19:26 -04:00
Chef Expeditor
47ac2566c4 Bump version to 4.28.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-19 14:17:52 +00:00
Clinton Wolfe
5378a5128b
Merge pull request #5434 from inspec/vasundhara/fix-for-controls-option 2021-03-19 10:16:02 -04:00
Chef Expeditor
9ab75923cf Bump version to 4.28.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-19 14:11:14 +00:00
Vasu1105
428a8a7194 Added code comments and rename control_list_exist? method to controls_list_exist?
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:12 +05:30
Vasu1105
2dcd174ff1 minor code fix
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:12 +05:30
Vasu1105
a5932b7da7 Fixes 5215: While using --controls options the control block was also getting evaluated as filtering of the control was happening after evaluating so added the filter logic in the control_eval_context. Also when we have describe block outside control block we are we
generating a control for them automatically and then execute due that also becomes a control and has to add same logic to filter the control in that mehtod

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:12 +05:30
Vasu1105
b984bbe960 Fixes #5215 : When we are using --controls option it was also evaluating the control block of not included controls in the controls option as it was filtering the controls from the list after evaluating updated the logic so that it gets evaluated after filtering. Removed filter_controls methods as no more using that
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:11 +05:30
Yoshi Yamaguchi
4981ca0a97 Add quotation around -name option to work properly with zsh
Singed-off-by: Yoshi Yamaguchi <yoshifumi@google.com>
2021-03-19 12:35:34 +09:00
Chef Expeditor
2f41c16ad4 Bump version to 4.28.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-17 17:21:06 +00:00
Collin McNeese
fa327ab55c
updates readme for profile inits to reference inputs instead of attributes
Signed-off-by: Collin McNeese <cmcneese@chef.io>
2021-03-17 11:28:20 -05:00
Collin McNeese
9da7a7338d
updates aws profile init to use inputs instead of attributes
Signed-off-by: Collin McNeese <cmcneese@chef.io>
2021-03-17 09:19:11 -05:00
Collin McNeese
2f4dc632a1
Updates GCP profile init to use inputs instead of attributes
Signed-off-by: Collin McNeese <cmcneese@chef.io>
2021-03-17 09:15:10 -05:00
Chef Expeditor
12a357a46b Bump version to 4.28.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-16 20:13:21 +00:00
Nick Schwaderer
4c03ad4c55 Support 'clear_cache'
Helps with Customer Bug 236 (see there for repro)

Currently, when we run `inspec compliance upload my_profile` it is
cached locally in inspec when run. If we update the version in the core
code and run another upload, `inspec compliance upload my_profile` again
it will run the old cached version instead of running a new copy
from automate.

The current workaround is to specify the desired version with
`inspec exec compliance://my_profile/admin#0.1.1`.

The caching happens before we have forward sight into the profile's
contents and only the target name. So the text used to generate the
cache would be `compliance://my_profile/admin` which does not change
version to version.

A fix here could simply identify when we are doing a local `inspec exec
compliance://` (hitting local profiles does not generate a cache) and
skips the cache if there's no version specified. That would eliminate
the unexpected behavior. However, it is a breaking change for customers
as some current caching taking place would no longer take place.

Instead, we have included a `clear_cache` cli method for InSpec,
which should assist the core team and other developers in the future
when debugging edge case issues in InSpec.

Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2021-03-16 15:41:55 -04:00
Chef Expeditor
4bb0af3dbe Bump version to 4.27.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-16 16:18:50 +00:00
Alexander Stein
351a943b35 Put back passthrough automate reporter output.
Signed-off-by: Alexander Stein <astein@flexion.us>
2021-03-15 13:17:54 -04:00
Chef Expeditor
cf48b46d00 Bump version to 4.27.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2021-03-15 15:51:03 +00:00