Skip to content

Commit

Permalink
Merge "Added some more checks at the validate jobs command"
Browse files Browse the repository at this point in the history
  • Loading branch information
frodenas authored and Gerrit Code Review committed Nov 9, 2012
2 parents 0a724f7 + fbc75d3 commit 2b13908
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions cli/lib/cli/commands/deployment.rb
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion cli/spec/unit/job_property_validator_spec.rb
Expand Up @@ -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.