Permalink
Browse files

Merge "Added some more checks at the validate jobs command"

  • Loading branch information...
2 parents 0a724f7 + fbc75d3 commit 2b1390847e19f93e99590caedd746e0aacc98c5d @frodenas frodenas committed with Gerrit Code Review Nov 9, 2012
Showing with 14 additions and 3 deletions.
  1. +13 −2 cli/lib/cli/commands/deployment.rb
  2. +1 −1 cli/spec/unit/job_property_validator_spec.rb
@@ -136,8 +136,19 @@ def validate_jobs
check_if_release_dir
manifest = prepare_deployment_manifest(:resolve_properties => true)
- nl
- say("Analyzing release directory...".yellow)
+ if manifest["release"]
+ release_name = manifest["release"]["name"]
+ elsif manifest["releases"].count > 1
+ err("Cannot validate a deployment manifest with more than 1 release")
+ else
+ release_name = manifest["releases"].first["name"]
+ end
+ if release_name == release.dev_name || release_name == release.final_name
+ nl
+ say("Analyzing release directory...".yellow)
+ else
+ err("This release was not found in deployment manifest")
+ end
say(" - discovering packages")
packages = Bosh::Cli::PackageBuilder.discover(
@@ -3,5 +3,5 @@
require "spec_helper"
describe Bosh::Cli::JobPropertyValidator do
-
+ pending "needs tests"
end

0 comments on commit 2b13908

Please sign in to comment.