dpl icon indicating copy to clipboard operation
dpl copied to clipboard

elastic beanstalk, allow user to specify a zip file to deploy

Open awesomescot-zz opened this issue 11 years ago • 15 comments

I would like to specify a zip file in my repo to upload, instead of ziping up the whole repo and uploading it. It would be nice is there was just a flag you could give it like --zip-file=./path/to/file.zip that would override the default of creating a zip file.

awesomescot-zz avatar Jan 26 '15 20:01 awesomescot-zz

This and #172 would be great.

dimas-cyriaco avatar Jan 28 '15 20:01 dimas-cyriaco

Beside that it would be more better if we can upload the path of binary source code file=/path/to/something.war because if we are using java or else which required compiling the source code to deploy, it can be a good solution. Right now i am having this issues to deploy my java based application to be deployed in elasticbeanstalk using travis.

anishjoshi avatar Feb 21 '15 06:02 anishjoshi

Would anyone be interested in helping implement this?

joshk avatar Feb 23 '15 02:02 joshk

Since I created the issue. I'll take a look. Where is the best place to get help, if I get over my head?

awesomescot-zz avatar Feb 23 '15 20:02 awesomescot-zz

+1

lipis avatar Mar 10 '15 14:03 lipis

Setting a zip file would be really helpful. Especially if you want to deploy an app, that must compile files for the deployment.

bennycode avatar Mar 10 '15 14:03 bennycode

@awesomescot I might be able to help out if you'd like

zabawaba99 avatar Mar 10 '15 18:03 zabawaba99

Would be awesome to have that solved!! Thanks in advanced :dancers:

lipis avatar Mar 10 '15 18:03 lipis

@zabawaba99 I would love some help. Here is where I'm at. I've made the changes that I think are needed, but I'm having trouble testing it. For some reason the aws-sdk gem doesn't think the file exists to upload it, but it does and I can copy the path from the error and see the file. If you want to checkout my code it's here: [email protected]:awesomescot/dpl.git. And here is the error. /home/scot/.rvm/gems/ruby-2.0.0-p598@dpl/gems/aws-sdk-v1-1.63.0/lib/aws/core/managed_file.rb:27:in initialize': No such file or directory - /home/scot/personal/dpl/lib/file.zip (Errno::ENOENT) from /home/scot/.rvm/gems/ruby-2.0.0-p598@dpl/gems/aws-sdk-v1-1.63.0/lib/aws/core/managed_file.rb:27:inopen' from /home/scot/.rvm/gems/ruby-2.0.0-p598@dpl/gems/aws-sdk-v1-1.63.0/lib/aws/core/managed_file.rb:27:in open' from /home/scot/.rvm/gems/ruby-2.0.0-p598@dpl/gems/aws-sdk-v1-1.63.0/lib/aws/s3/data_options.rb:139:inopen_file' from /home/scot/.rvm/gems/ruby-2.0.0-p598@dpl/gems/aws-sdk-v1-1.63.0/lib/aws/s3/data_options.rb:78:in convert_data_to_io_obj' from /home/scot/.rvm/gems/ruby-2.0.0-p598@dpl/gems/aws-sdk-v1-1.63.0/lib/aws/s3/data_options.rb:36:incompute_write_options' from /home/scot/.rvm/gems/ruby-2.0.0-p598@dpl/gems/aws-sdk-v1-1.63.0/lib/aws/s3/s3_object.rb:602:in write' from /home/scot/personal/dpl/lib/dpl/provider/elastic_beanstalk.rb:99:inupload' from /home/scot/personal/dpl/lib/dpl/provider/elastic_beanstalk.rb:31:in push_app' from /home/scot/personal/dpl/lib/dpl/provider.rb:140:inblock in deploy' from /home/scot/personal/dpl/lib/dpl/cli.rb:41:in fold' from /home/scot/personal/dpl/lib/dpl/provider.rb:140:indeploy' from /home/scot/personal/dpl/lib/dpl/cli.rb:32:in run' from /home/scot/personal/dpl/lib/dpl/cli.rb:7:inrun' from ./bin/dpl:5:in `

'

awesomescot-zz avatar Mar 10 '15 20:03 awesomescot-zz

@awesomescot Just made a PR into your repository so you could test it on your end. It should resolve this issue.

zabawaba99 avatar Mar 11 '15 02:03 zabawaba99

Great. I'll check it out tomorrow and make the request upstream.
Is there any reason why you decided to not use the optional_option function? To me it looks like option is being used for optional options in other places in the code, like in the region method in elastic_beanstalk.rb. def region option(:region) || DEFAULT_REGION end But the option method prints an error when the region option doesn't exist. So I thought this optional_option method might be of use. But maybe it's a little confusing? Or am I missing some detail?

awesomescot-zz avatar Mar 11 '15 03:03 awesomescot-zz

I think it may have been the naming of the method optional_option that seemed a little confusing. I figured since we already has the options hash available to us it would be easier to just access a key in it instead of moving that over to a wrapper method.

zabawaba99 avatar Mar 11 '15 03:03 zabawaba99

I've created a pull request for this issue.

awesomescot-zz avatar Mar 11 '15 22:03 awesomescot-zz

Just what I'm looking for!

davidsmith2 avatar Mar 26 '15 00:03 davidsmith2

Use edge: true to test this functionality until we release a new version.

BanzaiMan avatar May 04 '15 16:05 BanzaiMan