cloudfoundry-community / bosh-gen

Rapid generation of BOSH releases
MIT License
68 stars 21 forks source link

Extract Package fails when files are not in source location #109

Closed sba30 closed 6 years ago

sba30 commented 6 years ago
± |master ?:2 ✗| → bosh-gen extract-pkg ~/fluentd-boshrelease/packages/common
       exist  packages/common
   identical  packages/common/packaging
       chmod  packages/common/packaging
   identical  packages/common/spec
       chmod  packages/common/spec
/Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bosh-gen-0.98.0/lib/bosh/gen/generators/extract_package_generator.rb:59:in `join': no implicit conversion of nil into String (TypeError)
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bosh-gen-0.98.0/lib/bosh/gen/generators/extract_package_generator.rb:59:in `block (3 levels) in copy_package_spec_files'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bosh-gen-0.98.0/lib/bosh/gen/generators/extract_package_generator.rb:57:in `each'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bosh-gen-0.98.0/lib/bosh/gen/generators/extract_package_generator.rb:57:in `block (2 levels) in copy_package_spec_files'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bosh-gen-0.98.0/lib/bosh/gen/generators/extract_package_generator.rb:55:in `each'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bosh-gen-0.98.0/lib/bosh/gen/generators/extract_package_generator.rb:55:in `block in copy_package_spec_files'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bosh-gen-0.98.0/lib/bosh/gen/generators/extract_package_generator.rb:51:in `each'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bosh-gen-0.98.0/lib/bosh/gen/generators/extract_package_generator.rb:51:in `copy_package_spec_files'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in `block in invoke_all'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in `each'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in `map'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in `invoke_all'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/group.rb:232:in `dispatch'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bosh-gen-0.98.0/lib/bosh/gen/cli.rb:120:in `extract_pkg'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
        from /Users/localadmin/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bosh-gen-0.98.0/bin/bosh-gen:7:in `<top (required)>'
        from /Users/localadmin/.rbenv/versions/2.4.1/bin/bosh-gen:22:in `load'
        from /Users/localadmin/.rbenv/versions/2.4.1/bin/bosh-gen:22:in `<main>'

Seems like the conditonal for files existing in src vs blobs has been removed.

drnic commented 6 years ago

I'm investigating.

BTW I strongly recommend using https://github.com/cloudfoundry-incubator/bpm-release/ rather than packages/common to make it fun and easy to write BOSH jobs.

bosh-gen new and bosh-gen jobs both assume bpm now

drnic commented 6 years ago

Give master branch a go. Sorry about that.