elastic beanstalk, allow user to specify a zip file to deploy
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.
This and #172 would be great.
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.
Would anyone be interested in helping implement this?
Since I created the issue. I'll take a look. Where is the best place to get help, if I get over my head?
+1
Setting a zip file would be really helpful. Especially if you want to deploy an app, that must compile files for the deployment.
@awesomescot I might be able to help out if you'd like
Would be awesome to have that solved!! Thanks in advanced :dancers:
@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 Just made a PR into your repository so you could test it on your end. It should resolve this issue.
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?
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.
I've created a pull request for this issue.
Just what I'm looking for!
Use edge: true to test this functionality until we release a new version.