gemfile groups

pedro.visintin's Avatar

pedro.visintin

10 Feb, 2012 07:27 PM

gems on groups that are not development or test are included in production environment because the default recipe just exclude test and development, we need to exclude ci group on production.

    Chef::Log.info("sudo su deploy -c 'cd #{app_root_path} && bundle install --path #{app_config[:home]}/.bundler/#{app_name} --without=test development'")

How can we do that without changing scalarium default deploy recipe?

Thanks

P

  1. Support Staff 2 Posted by Jonathan Weiss on 11 Feb, 2012 05:11 PM

    Jonathan Weiss's Avatar

    This is not possible yet without changing the recipe.

    We will see that we make that configurable through Chef attributes / custom JSON.

  2. 3 Posted by pedro.visintin on 11 Feb, 2012 07:25 PM

    pedro.visintin's Avatar

    Thanks for taking a look on this.

    Will be great to be configurable because we had to remove the ci group on our Gemlist and is not a good idea to change the scalarium deploy recipe.

    Bests

    P

  3. Support Staff 4 Posted by Daniel Hüsch on 13 Feb, 2012 08:26 AM

    Daniel Hüsch's Avatar

    I just made this configurable and added you as a contact in Google Talk. Let me know when you are ready to test it and I will show you how.

  4. Support Staff 5 Posted by Daniel Hüsch on 13 Feb, 2012 10:50 AM

    Daniel Hüsch's Avatar

    As explained outside tender, you are able to set the bundler groups to ignore with custom JSON, as follows.

    "rails": {
      "ignore_bundler_groups": ["test", "development", "ci"]
    }
    

    Right now, that's only possible in your production cloud.

  5. Support Staff 6 Posted by Jonathan Weiss on 07 May, 2012 03:17 PM

    Jonathan Weiss's Avatar

    Hi Pedro,

    We are going to have to rename this namespace in order to prepare for a Ruby + Chef update.

    In the future this will be:

    "scalarium": {
      "rails": {
        "ignore_bundler_groups": ["test", "development", "ci"]
      }
    }
    

    So please set bot versions for a while.

  6. 7 Posted by pedro.visintin on 07 May, 2012 03:35 PM

    pedro.visintin's Avatar

    Thanks for let us know.

    Do you know when this will be implemented?

    Thanks

    P

  7. Support Staff 8 Posted by Jonathan Weiss on 07 May, 2012 03:38 PM

    Jonathan Weiss's Avatar

    I guess we will roll this out over the next week, but just have both syntax like this

    {
        "scalarium": {
          "rails": {
            "ignore_bundler_groups": ["test", "development", "ci"]
          }
        },
        "rails": {
          "ignore_bundler_groups": ["test", "development", "ci"]
        }
    }
    

    This way it will work both with the old and the new syntax and you don't have to worry. At some point you can remove the old syntax after we deployed the new.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.