-
Notifications
You must be signed in to change notification settings - Fork 1
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
How to hardcode includes #8
Comments
I think this was resolved with the template_content changes? |
Ahh okay, I see what you were referencing. Time for an infodump: So to render a template, Chef needs two bits of information: the template name and which cookbook the template is in (hereafter template source and template cookbook). For the template source, you either have to pass that when you create the resource instance, or optionally give a default_source when defining the resource. For the template cookbook you have four options (checked in order):
Most of the time we want to be using case 4, but there is a hitch. What 4 is actually computing is the cookbook of the thing that called So how do we fix this? I just pushed a change to poise that should provide flexible enough semantics. In short the change is that if you define the same template_content attribute again in a subclass, it inherits the options from the original. This means that in This has been a 2AM braindump. We now return you to your regularly scheduled programming. |
@coderanger this is no longer an issue given https://github.com/balanced-cookbooks/jenkins/pull/2 rght? |
how does chef know how to include templates?
if i change this line https://github.com/balanced-cookbooks/balanced-ci/blob/new-jobs/libraries/balanced_ci_job.rb#L16
to
source 'job-balanced.xml.erb'
i get the error
The text was updated successfully, but these errors were encountered: