diff options
author | Salim Alam <salam@chef.io> | 2016-02-05 12:50:33 -0800 |
---|---|---|
committer | Salim Alam <salam@chef.io> | 2016-02-05 13:20:57 -0800 |
commit | 757f38cf5a004dbd3f97c8eff30761744b4051cd (patch) | |
tree | fbfa3fbf62837d0f7aedf5f7e32c46c6e699cbc7 /acceptance | |
parent | aa2d22fc80e67f607f8cd7feb7cc02bb09b9a377 (diff) | |
download | chef-757f38cf5a004dbd3f97c8eff30761744b4051cd.tar.gz |
Update to use .shared cookbooksalam/unique-gems
Diffstat (limited to 'acceptance')
14 files changed, 22 insertions, 13 deletions
diff --git a/acceptance/shared/.kitchen.digitalocean.yml b/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml index 50558c3d39..50558c3d39 100644 --- a/acceptance/shared/.kitchen.digitalocean.yml +++ b/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml diff --git a/acceptance/shared/.kitchen.ec2.yml b/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml index fc82c907e6..fc82c907e6 100644 --- a/acceptance/shared/.kitchen.ec2.yml +++ b/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml diff --git a/acceptance/shared/.kitchen.vagrant.yml b/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml index f978658477..f978658477 100644 --- a/acceptance/shared/.kitchen.vagrant.yml +++ b/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml diff --git a/acceptance/shared/libraries/kitchen.rb b/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb index 3a3d61bad1..5380b7002c 100644 --- a/acceptance/shared/libraries/kitchen.rb +++ b/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb @@ -5,9 +5,22 @@ class Kitchen < Chef::Resource property :driver, %w(ec2 vagrant), coerce: proc { |v| v.to_s }, default: lazy { ENV["KITCHEN_DRIVER"] || :ec2 } property :instances, String, default: lazy { ENV["KITCHEN_INSTANCES"] } property :kitchen_dir, String, default: Chef.node['chef-acceptance']['suite-dir'] - property :chef_product, String, default: lazy { ENV["KITCHEN_CHEF_PRODUCT"] || ENV["PROJECT_NAME"] || "chef" } - property :chef_channel, String, default: lazy { ENV["KITCHEN_CHEF_CHANNEL"] || ((ENV["KITCHEN_CHEF_VERSION"] || ENV["OMNIBUS_BUILD_VERSION"]) ? "unstable" : "current") } - property :chef_version, String, default: lazy { ENV["KITCHEN_CHEF_VERSION"] || ENV["OMNIBUS_BUILD_VERSION"] || "latest" } + property :chef_product, String, default: lazy { + ENV["KITCHEN_CHEF_PRODUCT"] || + # If we're running the chef or chefdk projects in jenkins, pick up the project name. + (%w(chef chefdk).include?(ENV["PROJECT_NAME"]) ? ENV["PROJECT_NAME"] : "chef") + } + property :chef_channel, String, default: lazy { + ENV["KITCHEN_CHEF_CHANNEL"] || + # Pick up current if we can't connect to artifactory + (ENV["ARTIFACTORY_USERNAME"] ? "unstable" : "current") + } + property :chef_version, String, default: lazy { + ENV["KITCHEN_CHEF_VERSION"] || + # If we're running the chef or chefdk projects in jenkins, pick up the project name. + (ENV["PROJECT_NAME"] == chef_product ? ENV["OMNIBUS_BUILD_VERSION"] : nil) || + "latest" + } property :artifactory_username, String, default: lazy { ENV["ARTIFACTORY_USERNAME"] } property :artifactory_password, String, default: lazy { ENV["ARTIFACTORY_PASSWORD"] } property :env, Hash, default: {} @@ -18,7 +31,7 @@ class Kitchen < Chef::Resource env({ "KITCHEN_DRIVER" => driver, "KITCHEN_INSTANCES" => instances, - "KITCHEN_LOCAL_YAML" => ::File.join(Chef.node["chef-acceptance"]["suite-dir"], "../shared/.kitchen.#{driver}.yml"), + "KITCHEN_LOCAL_YAML" => ::File.expand_path("../../.kitchen.#{driver}.yml", __FILE__), "KITCHEN_CHEF_PRODUCT" => chef_product, "KITCHEN_CHEF_CHANNEL" => chef_channel, "KITCHEN_CHEF_VERSION" => chef_version, diff --git a/acceptance/.shared/kitchen_acceptance/metadata.rb b/acceptance/.shared/kitchen_acceptance/metadata.rb new file mode 100644 index 0000000000..70dc342d09 --- /dev/null +++ b/acceptance/.shared/kitchen_acceptance/metadata.rb @@ -0,0 +1 @@ +name "kitchen_acceptance" diff --git a/acceptance/basics/.acceptance/acceptance-cookbook/metadata.rb b/acceptance/basics/.acceptance/acceptance-cookbook/metadata.rb index cebbbbc2eb..2b7547b70d 100644 --- a/acceptance/basics/.acceptance/acceptance-cookbook/metadata.rb +++ b/acceptance/basics/.acceptance/acceptance-cookbook/metadata.rb @@ -1,3 +1,3 @@ name 'acceptance-cookbook' -depends "shared" +depends "kitchen_acceptance" diff --git a/acceptance/basics/.acceptance/shared b/acceptance/basics/.acceptance/shared deleted file mode 120000 index 0ab0cb2b3a..0000000000 --- a/acceptance/basics/.acceptance/shared +++ /dev/null @@ -1 +0,0 @@ -../../shared
\ No newline at end of file diff --git a/acceptance/cookbook-git/.acceptance/acceptance-cookbook/metadata.rb b/acceptance/cookbook-git/.acceptance/acceptance-cookbook/metadata.rb index ec14b6ad4b..26cdab4e99 100644 --- a/acceptance/cookbook-git/.acceptance/acceptance-cookbook/metadata.rb +++ b/acceptance/cookbook-git/.acceptance/acceptance-cookbook/metadata.rb @@ -1,3 +1,3 @@ name "acceptance-cookbook" -depends "shared" +depends "kitchen_acceptance" diff --git a/acceptance/cookbook-git/.acceptance/shared b/acceptance/cookbook-git/.acceptance/shared deleted file mode 120000 index 0ab0cb2b3a..0000000000 --- a/acceptance/cookbook-git/.acceptance/shared +++ /dev/null @@ -1 +0,0 @@ -../../shared
\ No newline at end of file diff --git a/acceptance/shared/metadata.rb b/acceptance/shared/metadata.rb deleted file mode 100644 index 13549dc682..0000000000 --- a/acceptance/shared/metadata.rb +++ /dev/null @@ -1 +0,0 @@ -name "shared" diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb b/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb index 7135298e69..6c754560f0 100644 --- a/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb +++ b/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb @@ -1,2 +1,2 @@ name "acceptance-cookbook" -depends "shared" +depends "kitchen_acceptance" diff --git a/acceptance/trivial/.acceptance/shared b/acceptance/trivial/.acceptance/shared deleted file mode 120000 index 0ab0cb2b3a..0000000000 --- a/acceptance/trivial/.acceptance/shared +++ /dev/null @@ -1 +0,0 @@ -../../shared
\ No newline at end of file diff --git a/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb b/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb index 7135298e69..6c754560f0 100644 --- a/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb +++ b/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb @@ -1,2 +1,2 @@ name "acceptance-cookbook" -depends "shared" +depends "kitchen_acceptance" diff --git a/acceptance/windows-service/.acceptance/shared b/acceptance/windows-service/.acceptance/shared deleted file mode 120000 index 0ab0cb2b3a..0000000000 --- a/acceptance/windows-service/.acceptance/shared +++ /dev/null @@ -1 +0,0 @@ -../../shared
\ No newline at end of file |