-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle without test development #14
Comments
I’m not sure what build this is referring to. Gems in test and development groups should already be excluded from the package that is deployed to lambda. Are you seeing otherwise? Or is there something else you want them excluded from? |
I could be wrong about the package the gets uploaded to the cloud provider, but the serverless package when built using Again I may be wrong. The setup.rb file of the serverless package contains gems within the test group i.e.
source "https://rubygems.org"
ruby '~> 2.5.5'
# development and test groups are not bundled as part of the deployment
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
# gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'rake'
gem 'pry'
gem 'awesome_print'
end
group :test do
gem 'rspec'
gem 'launchy'
gem 'capybara'
end
gem 'aws-sdk-secretsmanager'
gem 'redis-activesupport'
gem 'content_disposition'
gem 'mechanize' |
You may be right - I might have broken that part when I added the dockerized packaging step. I'll look into this. |
Oh, I see what you are referring to. Yes, the The extra load paths are annoying, but should not break anything. I'm not sure how to fix that without manually building that setup.rb file. I was explicitly avoiding using the |
This is causing breakage for me as well because dev dependencies that are native (debase) are failing the package step. |
@apsoto don't you need those dev dependencies installed in order to develop? |
I've tried to troubleshoot this a bit and I had some success excluding dev and test groups without breaking the host's bundle environment. The solution is to mount
The In addition to updating the docker command that is run, we need some additional enhancements:
NOTE I haven't fully vetted this, beyond getting the bundle task to run AND exclude certain bundle groups. |
I use the dev and test groups for local unit testing, yard for docs, simplecov for code coverage, etc., some dev dependencies are necessary for VSCode plugins I use, but aren't necessary for production |
also, forgot to mention, this only became a problem once I added a native package to the default group. I had a native package in dev/test group and things would package and deploy without a problem. I have to comment out my native gems in the dev/test groups to get package/deploy to work rt now |
Agenda
Drop
test
anddevelopment
gems during build:bundle install --standalone --path vendor/bundle --without test development;
The text was updated successfully, but these errors were encountered: