user1476061
user1476061

Reputation:

How to disable "bundle check" in circleci config/yaml file

I use a private gem in an application, which is located at a private gem server. There is no access to that gem server outside of VPC.
In my Gemfile I put the private gem inside a custom group:

group :private do
  source 'http://private-server-address' do
    gem 'private-gem'
  end
end

I added these lines into circle.yml file to tell cicleci bundler to ignore my private gem:

dependencies:
  bundler:
    without: [production, staging, private]

But the problem is circleci runs bundle check and right after that just bundle install without any options.

Is it possible to disable bundle check? I couldn't find any info in the documentation.

Upvotes: 2

Views: 256

Answers (2)

keybits
keybits

Reputation: 4423

Another option is to use bundle config without followed by a list of groups that you wish to exclude, e.g.:

dependencies:
  pre:
    - bundle config without development:production

This would ignore the 'development' and 'production' groups.

Upvotes: 0

user1476061
user1476061

Reputation:

I haven't found a way to disable bundle check. I ended up using this workaround. Circleci sets some environment variables, so we can use them to tell bundler to ignore certain gems:

if !ENV['CIRCLECI']
  source 'http://your-private-address' do
    gem 'your_private_gem'
  end
end

And we don't need group :private anymore.

Upvotes: 1

Related Questions