Closed mjallday closed 10 years ago
So this would just be a new attribute on the resource like attribute(:build_command, kind_of: String, default: 'fab build')
and then down in the provider do new_resource.build_command
.
When you say resource do you mean the resource in balanced-ci or in the ci cookbook? As in #4 we ideally don't want to have to be explicit in everything we declare.
In Chef::Resource::BalancedCIPipeline
.
class Chef
class Resource::BalancedCiJob < Resource::CiJob
attribute(:downstream_triggers, kind_of: Array, default: [])
attribute(:downstream_joins, kind_of: Array, default: [])
attribute(:xxx ,kind_of: string)
end
class Provider::BalancedCiJob < Provider::CiJob
end
end
then
class Chef
class Resource::BalancedCiPipeline < Resource
end
class Provider::BalancedCiPipeline < Provider
def create_some_job
balanced_ci_job 'name' do
end
end
end
end
how to set attribute :xxx
to default new_resource.xxx?
If the default command for the build job was
fab build
, how could I customize and override that?I think it would be good if I could do