-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add cosmos validate to check plugins #1675
Conversation
@@ -36,5 +36,7 @@ task :build => [:require_version] do | |||
if platform == 'mswin32' or platform == 'mingw32' | |||
puts "Warning: Building gem on Windows will lose file permissions" | |||
end | |||
# Build the widgets in the src directory | |||
system("yarn run build") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see that we're already doing this via the docker-package-build
script but that only happens in the cosmos-init Dockerfile. As an example for other plugins, I think this command should also be here.
system = update_store(temp_dir) | ||
deploy_microservices(gem_path, variables, system) | ||
# Build a System for just this target | ||
system = System.new([@name], temp_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where most of the validation takes place ... all the targets and their cmd/tlm
Codecov Report
@@ Coverage Diff @@
## master #1675 +/- ##
==========================================
+ Coverage 70.67% 78.37% +7.70%
==========================================
Files 27 207 +180
Lines 1272 16924 +15652
==========================================
+ Hits 899 13265 +12366
- Misses 373 3659 +3286 Continue to review full report at Codecov.
|
cosmos/bin/cosmos
Outdated
plugin_hash = Cosmos::PluginModel.install_phase1(plugin_file_path, variables, scope: scope, validate_only: true) | ||
Cosmos::PluginModel.install_phase2(plugin_hash['name'], plugin_hash['variables'], scope: scope, validate_only: true, | ||
gem_file_path: plugin_file_path) | ||
if ENV['COSMOS_NO_STORE'] == 'validate_plugin' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary. ENV does not persist
@@ -308,6 +328,9 @@ if not ARGV[0].nil? # argument(s) given | |||
when 'rake' | |||
puts `rake #{ARGV[1..-1].join(' ')}` | |||
|
|||
when 'validate' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking "dryrun" when I read this, but I think validate is ok too. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think validate is clearer plus that's what someone else used to describe this.
closes #1337