Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow Automate profile dependencies #1647

Merged

Conversation

jeremymv2
Copy link
Contributor

@jeremymv2 jeremymv2 commented Apr 11, 2017

This fixes #1632

The change allows for compliance profiles identified via compliance: owner_name/profile_name in inspec.yml when the profile is in Automate, not Compliance server. Prior to this change, during the vendoring step, the compliance_profile_name method was only matching for Compliance server URL path, which differs from Automate's URL path slightly so the result was a lib/bundles/inspec-compliance/target.rb:84:in compliance_profile_name': undefined method []' for nil:NilClass (NoMethodError) error.

@target value
Compliance Server https://SERVER-FQDN/api/owners/OWNER_NAME/compliance/PROFILE_NAME/tar
Automate Server https://SERVER-FQDN/compliance/profiles/OWNER_NAME/PROFILE_NAME/tar

Tested and validated it works for both vendoring/uploading a meta-profile to Compliance Server AND Automate.

Signed-off-by: Jeremy J. Miller jm@chef.io

Signed-off-by: Jeremy J. Miller <jm@chef.io>
Copy link
Contributor

@adamleff adamleff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know enough about the URL paths on compliance vs. automate, so this review counts as a conditional 👍 for Ruby implementation only and to get us to two 👍 's from maintainers. If @chris-rock approves, this is good for merge.

Thanks for the fix, @jeremymv2!

Copy link
Contributor

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jeremymv2 for catching that issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inspec vendor meta profiles fails when dependency profile is in Automate asset store
4 participants