forked from test-kitchen/test-kitchen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from chef/CHEF-18291-windows-fix
[CHEF-18291] Habitat tests for the windows platform
- Loading branch information
Showing
9 changed files
with
44 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
--- | ||
origin: chef | ||
|
||
env: | ||
HAB_REFRESH_CHANNEL: "LTS-2024" | ||
|
||
expeditor: | ||
defaults: | ||
buildkite: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
export HAB_BLDR_CHANNEL="LTS-2024" | ||
_chef_client_ruby="core/ruby3_1" | ||
pkg_name="chef-test-kitchen-enterprise" | ||
pkg_origin="chef" | ||
pkg_maintainer="The Chef Maintainers <[email protected]>" | ||
pkg_description="The Chef Test Kitchen Enterprise" | ||
pkg_license=('Apache-2.0') | ||
_chef_client_ruby="core/ruby3_1" | ||
pkg_bin_dirs=( | ||
bin | ||
vendor/bin | ||
) | ||
pkg_build_deps=( | ||
core/make | ||
core/bash | ||
core/gcc | ||
) | ||
pkg_deps=( | ||
$_chef_client_ruby | ||
${_chef_client_ruby} | ||
core/coreutils | ||
core/git | ||
) | ||
|
@@ -29,14 +27,21 @@ do_before() { | |
update_pkg_version | ||
} | ||
|
||
do_setup_environment() { | ||
build_line 'Setting GEM_HOME="$pkg_prefix/vendor"' | ||
export GEM_HOME="$pkg_prefix/vendor" | ||
|
||
build_line "Setting GEM_PATH=$GEM_HOME" | ||
export GEM_PATH="$GEM_HOME" | ||
} | ||
|
||
do_unpack() { | ||
mkdir -pv "$HAB_CACHE_SRC_PATH/$pkg_dirname" | ||
cp -RT "$PLAN_CONTEXT"/.. "$HAB_CACHE_SRC_PATH/$pkg_dirname/" | ||
} | ||
|
||
do_build() { | ||
echo $(pkg_path_for $_chef_client_ruby) | ||
export GEM_HOME="$pkg_prefix/vendor/gems" | ||
export GEM_HOME="$pkg_prefix/vendor" | ||
|
||
build_line "Setting GEM_PATH=$GEM_HOME" | ||
export GEM_PATH="$GEM_HOME" | ||
|
@@ -50,15 +55,15 @@ do_build() { | |
} | ||
|
||
do_install() { | ||
export GEM_HOME="$pkg_prefix/vendor/gems" | ||
export GEM_HOME="$pkg_prefix/vendor" | ||
|
||
build_line "Setting GEM_PATH=$GEM_HOME" | ||
export GEM_PATH="$GEM_HOME" | ||
gem install chef-test-kitchen-enterprise-*.gem --no-document | ||
gem install chef-cli | ||
wrap_ruby_kitchen | ||
wrap_ruby_chef_cli | ||
set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor/gems" | ||
set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor" | ||
} | ||
|
||
wrap_ruby_kitchen() { | ||
|
@@ -85,7 +90,7 @@ set -e | |
export PATH="/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:\$PATH" | ||
# Set Ruby paths defined from 'do_setup_environment()' | ||
export GEM_HOME="$pkg_prefix/vendor/gems" | ||
export GEM_HOME="$pkg_prefix/vendor" | ||
export GEM_PATH="\$GEM_HOME" | ||
exec $(pkg_path_for $_chef_client_ruby)/bin/ruby $real_bin \$@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
driver: | ||
name: dokken | ||
privileged: true | ||
chef_version: unstable | ||
|
||
provisioner: | ||
name: dokken | ||
|