From c019f0291675039cbd9031d529336a560be1dd2c Mon Sep 17 00:00:00 2001 From: ivadim Date: Sun, 5 Aug 2018 14:24:38 -0700 Subject: [PATCH] Improve chef14 support (#30) * Fix issue with chef 14 * Add chef 14 and ubuntu 18.04 to tests --- .kitchen.yml | 7 +++++++ libraries/helpers.rb | 2 +- resources/default.rb | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.kitchen.yml b/.kitchen.yml index 5c23492..6518623 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -36,6 +36,12 @@ platforms: box: ubuntu/artful64 provisioner: require_chef_omnibus: 13.6.4 + + - name: ubuntu1804 + driver_config: + box: ubuntu/bionic64 + provisioner: + require_chef_omnibus: 14.3.37 - name: centos7 driver_config: @@ -97,6 +103,7 @@ suites: - debian9 - ubuntu1604 - ubuntu1710 + - ubuntu1804 - centos7 attributes: diff --git a/libraries/helpers.rb b/libraries/helpers.rb index f5a1914..2e05756 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -7,7 +7,7 @@ module Helpers require 'json' require 'fileutils' - def archive_name(version) + def get_archive_name(version) name = 'vsts_agent' name += '_' + version if version name diff --git a/resources/default.rb b/resources/default.rb index 9e5d2cb..d2c58fe 100644 --- a/resources/default.rb +++ b/resources/default.rb @@ -57,7 +57,7 @@ converge_if_changed do archive_url = download_url(version) - archive_name = archive_name(version) + archive_name = get_archive_name(version) unpack_dir = ::File.join(Chef::Config[:file_cache_path], 'unpack_agent') unpack_dir = win_friendly_path(unpack_dir) if windows?