Skip to content
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

Add --deployment flag check to ruby-bundler test #7188

Merged
merged 2 commits into from
Jan 9, 2020
Merged

Add --deployment flag check to ruby-bundler test #7188

merged 2 commits into from
Jan 9, 2020

Conversation

deivid-rodriguez
Copy link
Contributor

This PR adds a regression test for a recent issue that was introduced by bundler into the ruby docker images, as I mentioned I would do in docker-library/ruby#289 (comment).

@tianon

This comment has been minimized.

@deivid-rodriguez
Copy link
Contributor Author

Hei @tianon! Sorry for the delay here!

Ironically, unless we use the deprecated way, the issues I'm trying to cover here won't reproduce, due to another bug in bundler that I'm fixing in rubygems/bundler#7519.

So we can either ship this as it is, and update to the non-deprecated way once rubygems/bundler#7519 is shipped. Or ship the non-deprecated version directly (knowing that the test will only reproduce the issues it's trying to cover once run against bundler version's including the referenced bundler PR).

ghost pushed a commit to rubygems/bundler that referenced this pull request Dec 31, 2019
7519: Make `bundle config deployment true` equivalent to `bundle install --deployment` in regards to configuration r=deivid-rodriguez a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that while addressing comments for docker-library/official-images#7188, I noticed that the alternative we're recommending for `bundle install --deployment`, i.e., `bundle config set deployment true`, is not equivalent to it.

### What was your diagnosis of the problem?

My diagnosis was that whereas `bundle install --deployment` configures bundler to be frozen AND to install gems to `vendor/bundle`, `bundle config deployment true` only configures bundler to be frozen.

### What is your fix for the problem, implemented in this PR?

My fix is to make `bundle config deployment true`  behave just like `bundle install --deployment` in regards to configuration. 

### Why did you choose this fix out of the possible options?

I chose this fix because all the commands we're suggesting as alternatives for deprecations should be actual alternatives that work exactly in the same way.

Also, note that there's a change scheduled for bundler 3 where the `deployment` configuration will only mean `frozen`. But for now, we should focus on making sure that people moves away from CLI flags in favor of configuration, so we might want to delay that change to make things less confusing.


Co-authored-by: David Rodríguez <[email protected]>
deivid-rodriguez pushed a commit to rubygems/bundler that referenced this pull request Jan 1, 2020
7519: Make `bundle config deployment true` equivalent to `bundle install --deployment` in regards to configuration r=deivid-rodriguez a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that while addressing comments for docker-library/official-images#7188, I noticed that the alternative we're recommending for `bundle install --deployment`, i.e., `bundle config set deployment true`, is not equivalent to it.

### What was your diagnosis of the problem?

My diagnosis was that whereas `bundle install --deployment` configures bundler to be frozen AND to install gems to `vendor/bundle`, `bundle config deployment true` only configures bundler to be frozen.

### What is your fix for the problem, implemented in this PR?

My fix is to make `bundle config deployment true`  behave just like `bundle install --deployment` in regards to configuration.

### Why did you choose this fix out of the possible options?

I chose this fix because all the commands we're suggesting as alternatives for deprecations should be actual alternatives that work exactly in the same way.

Also, note that there's a change scheduled for bundler 3 where the `deployment` configuration will only mean `frozen`. But for now, we should focus on making sure that people moves away from CLI flags in favor of configuration, so we might want to delay that change to make things less confusing.

Co-authored-by: David Rodríguez <[email protected]>
(cherry picked from commit 9719efc)
@deivid-rodriguez
Copy link
Contributor Author

I pushed an alternative that uses the old way on old bundler versions and the new way on newer bundler versions where the old way is deprecated.

This still acts as a proper regression test for docker-library/ruby#288 on old bundler version, but tests the new recommended way on newer bundler versions.

@deivid-rodriguez
Copy link
Contributor Author

I pushed your suggestion and marked the conversation as resolved but let me know if you're still not happy with the assertion.

@yosifkit yosifkit requested a review from tianon January 7, 2020 01:35
@tianon
Copy link
Member

tianon commented Jan 9, 2020

Build test of #7188; d9e7c82; amd64 (ruby, jruby):

$ bashbrew build ruby:2.7.0-buster
Using bashbrew/cache:6a854763590be363bd8406163e9cd253a4ad4ce0486fc30bdd44d53ee550a0db (ruby:2.7.0-buster)
Tagging ruby:2.7.0-buster
Tagging ruby:2.7-buster
Tagging ruby:2-buster
Tagging ruby:buster
Tagging ruby:2.7.0
Tagging ruby:2.7
Tagging ruby:2
Tagging ruby:latest

$ test/run.sh ruby:2.7.0-buster
testing ruby:2.7.0-buster
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build ruby:2.7.0-slim-buster
Using bashbrew/cache:d8056a9495c095066bed85856c20c01ff57ba735513d2f4e78da531d5f3d9dbb (ruby:2.7.0-slim-buster)
Tagging ruby:2.7.0-slim-buster
Tagging ruby:2.7-slim-buster
Tagging ruby:2-slim-buster
Tagging ruby:slim-buster
Tagging ruby:2.7.0-slim
Tagging ruby:2.7-slim
Tagging ruby:2-slim
Tagging ruby:slim

$ test/run.sh ruby:2.7.0-slim-buster
testing ruby:2.7.0-slim-buster
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.7.0-alpine3.11
Using bashbrew/cache:b2dfd477c6bd13c0ddec85c6d9c845e48d93bf4eebe532a22fa741aea798ab58 (ruby:2.7.0-alpine3.11)
Tagging ruby:2.7.0-alpine3.11
Tagging ruby:2.7-alpine3.11
Tagging ruby:2-alpine3.11
Tagging ruby:alpine3.11
Tagging ruby:2.7.0-alpine
Tagging ruby:2.7-alpine
Tagging ruby:2-alpine
Tagging ruby:alpine

$ test/run.sh ruby:2.7.0-alpine3.11
testing ruby:2.7.0-alpine3.11
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.7.0-alpine3.10
Using bashbrew/cache:806aa80c0e07b35aff3e6d59d57aaf7120a14100b02cc7ef22cb4c02fe82051c (ruby:2.7.0-alpine3.10)
Tagging ruby:2.7.0-alpine3.10
Tagging ruby:2.7-alpine3.10
Tagging ruby:2-alpine3.10
Tagging ruby:alpine3.10

$ test/run.sh ruby:2.7.0-alpine3.10
testing ruby:2.7.0-alpine3.10
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.6.5-buster
Using bashbrew/cache:04e7cb51ca03e3e6eb9adc87da703d8d6ee305fbc7d08f6bed2e62cf6335c20b (ruby:2.6.5-buster)
Tagging ruby:2.6.5-buster
Tagging ruby:2.6-buster
Tagging ruby:2.6.5
Tagging ruby:2.6

$ test/run.sh ruby:2.6.5-buster
testing ruby:2.6.5-buster
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build ruby:2.6.5-slim-buster
Using bashbrew/cache:0ff7b13a1d212218aa37d6bc6f03996179146693bf456934691e1daa109c942e (ruby:2.6.5-slim-buster)
Tagging ruby:2.6.5-slim-buster
Tagging ruby:2.6-slim-buster
Tagging ruby:2.6.5-slim
Tagging ruby:2.6-slim

$ test/run.sh ruby:2.6.5-slim-buster
testing ruby:2.6.5-slim-buster
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.6.5-stretch
Using bashbrew/cache:0005fa5627e756aaf2ef67b86ac9fafbf286f4590af62671ae89820e75076507 (ruby:2.6.5-stretch)
Tagging ruby:2.6.5-stretch
Tagging ruby:2.6-stretch

$ test/run.sh ruby:2.6.5-stretch
testing ruby:2.6.5-stretch
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build ruby:2.6.5-slim-stretch
Using bashbrew/cache:50586f83a833bac84683adfb8415eb18070f103fa0e166e4c93c2e741def1237 (ruby:2.6.5-slim-stretch)
Tagging ruby:2.6.5-slim-stretch
Tagging ruby:2.6-slim-stretch

$ test/run.sh ruby:2.6.5-slim-stretch
testing ruby:2.6.5-slim-stretch
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.6.5-alpine3.11
Using bashbrew/cache:6400e4d0b6565d8421dbcf4ac2ecb46c3db844acf7f50fa415c85bab0126e8d5 (ruby:2.6.5-alpine3.11)
Tagging ruby:2.6.5-alpine3.11
Tagging ruby:2.6-alpine3.11
Tagging ruby:2.6.5-alpine
Tagging ruby:2.6-alpine

$ test/run.sh ruby:2.6.5-alpine3.11
testing ruby:2.6.5-alpine3.11
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.6.5-alpine3.10
Using bashbrew/cache:4774e8a4d1b23e78168a3188fe471ea3e6afe38acd00ad100bdf490ae3f731ba (ruby:2.6.5-alpine3.10)
Tagging ruby:2.6.5-alpine3.10
Tagging ruby:2.6-alpine3.10

$ test/run.sh ruby:2.6.5-alpine3.10
testing ruby:2.6.5-alpine3.10
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.5.7-buster
Using bashbrew/cache:4527865cf66c403aad02efb45935c5fb1a93835620690ce1f85fc9e16792054b (ruby:2.5.7-buster)
Tagging ruby:2.5.7-buster
Tagging ruby:2.5-buster
Tagging ruby:2.5.7
Tagging ruby:2.5

$ test/run.sh ruby:2.5.7-buster
testing ruby:2.5.7-buster
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build ruby:2.5.7-slim-buster
Using bashbrew/cache:77d7c51e071f11c4b6bacc67ed663f5644df5a4e5abbeb81cf09eb5768fe4289 (ruby:2.5.7-slim-buster)
Tagging ruby:2.5.7-slim-buster
Tagging ruby:2.5-slim-buster
Tagging ruby:2.5.7-slim
Tagging ruby:2.5-slim

$ test/run.sh ruby:2.5.7-slim-buster
testing ruby:2.5.7-slim-buster
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.5.7-stretch
Using bashbrew/cache:947e9a32e27a59542404359a0f3a79b0fa3d002f774ae0f71acd2e45f843bb90 (ruby:2.5.7-stretch)
Tagging ruby:2.5.7-stretch
Tagging ruby:2.5-stretch

$ test/run.sh ruby:2.5.7-stretch
testing ruby:2.5.7-stretch
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build ruby:2.5.7-slim-stretch
Using bashbrew/cache:7882f0eb74483a747fe8bfaeb5710d9ff20844c95e441d8f23ac4a00230ae902 (ruby:2.5.7-slim-stretch)
Tagging ruby:2.5.7-slim-stretch
Tagging ruby:2.5-slim-stretch

$ test/run.sh ruby:2.5.7-slim-stretch
testing ruby:2.5.7-slim-stretch
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.5.7-alpine3.11
Using bashbrew/cache:ed9bcd4a4780d66769b1fec56696386b08e7a0fcdf83956b4fd9dd889ba8313a (ruby:2.5.7-alpine3.11)
Tagging ruby:2.5.7-alpine3.11
Tagging ruby:2.5-alpine3.11
Tagging ruby:2.5.7-alpine
Tagging ruby:2.5-alpine

$ test/run.sh ruby:2.5.7-alpine3.11
testing ruby:2.5.7-alpine3.11
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.5.7-alpine3.10
Using bashbrew/cache:a667b443add62fb01222d4e449d0f3856ce04dc9a47c3438661ef697d53a0848 (ruby:2.5.7-alpine3.10)
Tagging ruby:2.5.7-alpine3.10
Tagging ruby:2.5-alpine3.10

$ test/run.sh ruby:2.5.7-alpine3.10
testing ruby:2.5.7-alpine3.10
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.4.9-buster
Using bashbrew/cache:4ea370975ccf96170ac9045687f07bb43f65ea98aceb0fcccc7a4c3c402a0231 (ruby:2.4.9-buster)
Tagging ruby:2.4.9-buster
Tagging ruby:2.4-buster
Tagging ruby:2.4.9
Tagging ruby:2.4

$ test/run.sh ruby:2.4.9-buster
testing ruby:2.4.9-buster
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...skipping activesupport due to required Ruby version: >= 2.5.0 (vs 2.4.9)
passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build ruby:2.4.9-slim-buster
Using bashbrew/cache:c7da3185f71abf0e057c9eae16838043684e25821ad64c237af4ff6a38a42701 (ruby:2.4.9-slim-buster)
Tagging ruby:2.4.9-slim-buster
Tagging ruby:2.4-slim-buster
Tagging ruby:2.4.9-slim
Tagging ruby:2.4-slim

$ test/run.sh ruby:2.4.9-slim-buster
testing ruby:2.4.9-slim-buster
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.4.9-stretch
Using bashbrew/cache:8a56934491265054b6ef46026d0520bf725b258eb7aea5e78fccc9f77f906434 (ruby:2.4.9-stretch)
Tagging ruby:2.4.9-stretch
Tagging ruby:2.4-stretch

$ test/run.sh ruby:2.4.9-stretch
testing ruby:2.4.9-stretch
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...skipping activesupport due to required Ruby version: >= 2.5.0 (vs 2.4.9)
passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build ruby:2.4.9-slim-stretch
Using bashbrew/cache:8e80367f1a105c9fe9b4dc12df6bc3361728e4963dab56077d3e7760df1ba54e (ruby:2.4.9-slim-stretch)
Tagging ruby:2.4.9-slim-stretch
Tagging ruby:2.4-slim-stretch

$ test/run.sh ruby:2.4.9-slim-stretch
testing ruby:2.4.9-slim-stretch
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.4.9-alpine3.11
Using bashbrew/cache:cd1b9f0c2dc5cdd0d605821b7c12643ab29a0f0caf9b0c4f2a81ef37a68c3912 (ruby:2.4.9-alpine3.11)
Tagging ruby:2.4.9-alpine3.11
Tagging ruby:2.4-alpine3.11
Tagging ruby:2.4.9-alpine
Tagging ruby:2.4-alpine

$ test/run.sh ruby:2.4.9-alpine3.11
testing ruby:2.4.9-alpine3.11
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed


$ bashbrew build ruby:2.4.9-alpine3.10
Using bashbrew/cache:10d7857ab92f58881fb17e19a3db1621b4ddd157b9275706525b19a7143214d8 (ruby:2.4.9-alpine3.10)
Tagging ruby:2.4.9-alpine3.10
Tagging ruby:2.4-alpine3.10

$ test/run.sh ruby:2.4.9-alpine3.10
testing ruby:2.4.9-alpine3.10
	'utc' [1/8]...passed
	'cve-2014--shellshock' [2/8]...passed
	'no-hard-coded-passwords' [3/8]...passed
	'override-cmd' [4/8]...passed
	'ruby-hello-world' [5/8]...passed
	'ruby-standard-libs' [6/8]...passed
	'ruby-nonroot' [7/8]...passed
	'ruby-binstubs' [8/8]...passed
$ bashbrew build jruby:latest
Using bashbrew/cache:83e8e83754d151f38961c5d99ce32ea61359a3fceb71767d2faee1ffdbf56442 (jruby:latest)
Tagging jruby:latest
Tagging jruby:9
Tagging jruby:9.2
Tagging jruby:9.2.9
Tagging jruby:9.2-jre
Tagging jruby:9.2.9-jre
Tagging jruby:9.2.9.0
Tagging jruby:9.2.9.0-jre

$ test/run.sh jruby:latest
testing jruby:latest
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build jruby:9-jdk
Using bashbrew/cache:88e13c18de5eb7fd570f2cb91e088aa3508e2b5a3caf8c0c5555c4843bf2f456 (jruby:9-jdk)
Tagging jruby:9-jdk
Tagging jruby:9.2-jdk
Tagging jruby:9.2.9-jdk
Tagging jruby:9.2.9.0-jdk

$ test/run.sh jruby:9-jdk
testing jruby:9-jdk
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build jruby:9.1
Using bashbrew/cache:c2c983a081533081be7452c36cd7adf10379c392db231dcf296177f90691630a (jruby:9.1)
Tagging jruby:9.1
Tagging jruby:9.1.17
Tagging jruby:9.1.17.0
Tagging jruby:9.1-jre
Tagging jruby:9.1.17-jre
Tagging jruby:9.1.17.0-jre

$ test/run.sh jruby:9.1
testing jruby:9.1
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...skipping activesupport due to required Ruby version: >= 2.5.0 (vs 2.3.3)
passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build jruby:9.1-jdk
Using bashbrew/cache:c4dacf20a82abd40bca31922da1ec9be37bc1752c554b3f6424f88e740e9a176 (jruby:9.1-jdk)
Tagging jruby:9.1-jdk
Tagging jruby:9.1.17-jdk
Tagging jruby:9.1.17.0-jdk

$ test/run.sh jruby:9.1-jdk
testing jruby:9.1-jdk
	'utc' [1/10]...passed
	'cve-2014--shellshock' [2/10]...passed
	'no-hard-coded-passwords' [3/10]...passed
	'override-cmd' [4/10]...passed
	'ruby-hello-world' [5/10]...passed
	'ruby-standard-libs' [6/10]...passed
	'ruby-gems' [7/10]...skipping activesupport due to required Ruby version: >= 2.5.0 (vs 2.3.3)
passed
	'ruby-bundler' [8/10]...passed
	'ruby-nonroot' [9/10]...passed
	'ruby-binstubs' [10/10]...passed


$ bashbrew build jruby:9-onbuild
Using bashbrew/cache:91ab597f78c792436bb07603d54c49c8ea1bdb0650dbe501f83429b34c5441e5 (jruby:9-onbuild)
Tagging jruby:9-onbuild
Tagging jruby:9.2-onbuild
Tagging jruby:9.2.9-onbuild
Tagging jruby:9.2.9.0-onbuild

$ test/run.sh jruby:9-onbuild
testing jruby:9-onbuild
	'override-cmd' [1/1]...passed

@tianon tianon merged commit 834823b into docker-library:master Jan 9, 2020
@deivid-rodriguez deivid-rodriguez deleted the add_test_for_bundler_deployment_flag branch January 10, 2020 09:15
ghost pushed a commit to rubygems/rubygems that referenced this pull request Mar 11, 2020
7519: Make `bundle config deployment true` equivalent to `bundle install --deployment` in regards to configuration r=deivid-rodriguez a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that while addressing comments for docker-library/official-images#7188, I noticed that the alternative we're recommending for `bundle install --deployment`, i.e., `bundle config set deployment true`, is not equivalent to it.

### What was your diagnosis of the problem?

My diagnosis was that whereas `bundle install --deployment` configures bundler to be frozen AND to install gems to `vendor/bundle`, `bundle config deployment true` only configures bundler to be frozen.

### What is your fix for the problem, implemented in this PR?

My fix is to make `bundle config deployment true`  behave just like `bundle install --deployment` in regards to configuration. 

### Why did you choose this fix out of the possible options?

I chose this fix because all the commands we're suggesting as alternatives for deprecations should be actual alternatives that work exactly in the same way.

Also, note that there's a change scheduled for bundler 3 where the `deployment` configuration will only mean `frozen`. But for now, we should focus on making sure that people moves away from CLI flags in favor of configuration, so we might want to delay that change to make things less confusing.


Co-authored-by: David Rodríguez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants