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

CN-147 refactor work #35

Merged
merged 1 commit into from
Apr 13, 2023
Merged

CN-147 refactor work #35

merged 1 commit into from
Apr 13, 2023

Conversation

drew-viles
Copy link
Contributor

@drew-viles drew-viles commented Apr 11, 2023

Reworked code to remove direct calls to viper.GetXXXX

Previously there were calls to viper.GetSomething all over the code. This was prone to error if a value changed so now the code has been refactored to process any viper inputs.
Flags will always override the viper config file and any fields not supplied will use the defaults where applicable.

Also:

  • Added checksum validation for the Trivy cli download
  • Removed duplicate Trivy report structs and generally moved some bits around to begin work for allowing other clouds to be used. There is still work to be done to allow other clouds though as it's still generally OpenStack focussed.
  • Added new docs/readme & changelog

Note
All testing has been completed from building an image through scan, sign and publish and all were functional. I need to look at how to automate this at some point in the pipeline so we can have the confidence in releases ;-)

@drew-viles drew-viles force-pushed the CN-147-refactor-work branch 5 times, most recently from 0000c1d to ef4b301 Compare April 12, 2023 12:37
@drew-viles drew-viles marked this pull request as ready for review April 12, 2023 13:32
Previously there were calls to viper.GetSomething all over the code. This was prone to error if a value changed so now the code has been refactored to process any viper inputs.
Flags will always override the viper config file and any fields not supplied will use the defaults where applicable.

Added checksum validation for the Trivy cli download

Removed duplicate Trivy report structs and generally moved some bits around to begin work for allowing other clouds to be used. There is still work to be done to allow other clouds though as it's still generally OpenStack focussed.

Added new docs/readme & changelog

Fixes #32 & Fixes #34
Copy link
Contributor

@yankcrime yankcrime left a comment

Choose a reason for hiding this comment

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

Looks good although haven't tested - I'll have to take your word for it!

@drew-viles drew-viles merged commit cfea4cc into main Apr 13, 2023
@drew-viles drew-viles deleted the CN-147-refactor-work branch April 13, 2023 11:11
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.

2 participants