forked from test-kitchen/test-kitchen
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rebranding Change and the new version and change.log file #11
Merged
Merged
Changes from 13 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
1bfdbc3
Change the new version and change.log file
sanghinitin a678dae
removed version constraint
sanghinitin fa6bd14
fixed pipeline issue
sanghinitin 2e4cbc0
Hab plan file change and gemspec file name changed
sanghinitin 64c64ff
Change in the plan to fix fetching test-kitchen gem
sanghinitin 0abcca2
removed kitchen-dokken gem dep using git kitchen-dokken
sanghinitin c57c55c
Merge branch 'main' into rebranding_change
sanghinitin fa118b5
Install git gem into gems dir in hab
sanghinitin 3e74ee2
updated the kitchen-dokken branch
ashiqueps 2f8c7d5
Moved the git dep to pkg_deps
ashiqueps 85c10cf
Plan updates for linux
ashiqueps 6926ec1
Change in windows plan to work with kitchen dokken and inspec
sanghinitin 0baa132
Merge pull request #12 from chef/plan_update_on_linux
sanghinitin 9b828f6
fixing the linting and other issues
nikhil2611 fbf30e1
fixing expeditor config
nikhil2611 f67b4aa
fixing test cases
nikhil2611 459a802
Fixed the windows integration test failure
ashiqueps 2a5bc3c
fixing test cases
nikhil2611 1267d29
Removed the windows and mac integration tests
ashiqueps 18dd440
Merge branch 'rebranding_change' of github.com:chef/chef-test-kitchen…
ashiqueps File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 +1 @@ | ||
3.7.1 | ||
1.0.0 |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ $ErrorActionPreference = "Stop" | |
$PSDefaultParameterValues['*:ErrorAction']='Stop' | ||
|
||
$env:HAB_BLDR_CHANNEL = "LTS-2024" | ||
$pkg_name="test-kitchen" | ||
$pkg_name="chef-test-kitchen-enterprise" | ||
$pkg_origin="chef" | ||
$pkg_version=$(Get-Content "$PLAN_CONTEXT/../VERSION") | ||
$pkg_maintainer="The Chef Maintainers <[email protected]>" | ||
|
@@ -44,12 +44,12 @@ function Invoke-Build { | |
bundle config --local silence_root_warning 1 | ||
Write-BuildLine " ** Using bundler to retrieve the Ruby dependencies" | ||
bundle install | ||
|
||
gem build test-kitchen.gemspec | ||
bundle lock --local | ||
gem build chef-test-kitchen-enterprise.gemspec | ||
Write-BuildLine " ** Using gem to install" | ||
gem install test-kitchen-*.gem --no-document | ||
gem install kitchen-dokken | ||
gem install chef-test-kitchen-enterprise*.gem --no-document | ||
|
||
ruby ./post-bundle-install.rb | ||
If ($lastexitcode -ne 0) { Exit $lastexitcode } | ||
} finally { | ||
Pop-Location | ||
|
@@ -65,11 +65,11 @@ function Invoke-Install { | |
try { | ||
Push-Location $pkg_prefix | ||
bundle config --local gemfile $project_root/Gemfile | ||
Write-BuildLine "** generating binstubs for test-kitchen with precise version pins" | ||
Write-BuildLine "** generating binstubs for test-kitchen with precise version pins $project_root $pkg_prefix/bin " | ||
Invoke-Expression -Command "appbundler.bat $project_root $pkg_prefix/bin test-kitchen" | ||
Write-BuildLine "** generating binstubs for chef-test-kitchen-enterprise with precise version pins" | ||
Write-BuildLine "** generating binstubs for chef-test-kitchen-enterprise with precise version pins $project_root $pkg_prefix/bin " | ||
Invoke-Expression -Command "appbundler.bat $project_root $pkg_prefix/bin chef-test-kitchen-enterprise" | ||
If ($lastexitcode -ne 0) { Exit $lastexitcode } | ||
Write-BuildLine " ** Running the test-kitchen project's 'rake install' to install the path-based gems so they look like any other installed gem." | ||
Write-BuildLine " ** Running the chef-test-kitchen-enterprise project's 'rake install' to install the path-based gems so they look like any other installed gem." | ||
|
||
If ($lastexitcode -ne 0) { Exit $lastexitcode } | ||
} finally { | ||
|
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,6 @@ | ||
export HAB_BLDR_CHANNEL="LTS-2024" | ||
_chef_client_ruby="core/ruby3_1" | ||
pkg_name="test-kitchen" | ||
pkg_name="chef-test-kitchen-enterprise" | ||
pkg_origin="chef" | ||
pkg_maintainer="The Chef Maintainers <[email protected]>" | ||
pkg_description="The Chef Test Kitchen" | ||
|
@@ -11,111 +11,72 @@ pkg_bin_dirs=( | |
) | ||
pkg_build_deps=( | ||
core/make | ||
core/bash | ||
core/gcc | ||
core/git | ||
) | ||
pkg_deps=( | ||
$_chef_client_ruby | ||
core/coreutils | ||
core/git | ||
) | ||
pkg_svc_user=root | ||
|
||
pkg_version() { | ||
cat "${SRC_PATH}/VERSION" | ||
cat "$SRC_PATH/VERSION" | ||
} | ||
|
||
do_before() { | ||
do_default_before | ||
update_pkg_version | ||
# We must wait until we update the pkg_version to use the pkg_version | ||
pkg_filename="${pkg_name}-${pkg_version}.tar.gz" | ||
} | ||
|
||
do_download() { | ||
build_line "Locally creating archive of latest repository commit at ${HAB_CACHE_SRC_PATH}/${pkg_filename}" | ||
git config --global --add safe.directory /src | ||
# source is in this repo, so we're going to create an archive from the | ||
# appropriate path within the repo and place the generated tarball in the | ||
# location expected by do_unpack | ||
( cd "${SRC_PATH}" || exit_with "unable to enter hab-src directory" 1 | ||
git archive --prefix="${pkg_name}-${pkg_version}/" --output="${HAB_CACHE_SRC_PATH}/${pkg_filename}" HEAD | ||
) | ||
} | ||
|
||
do_verify() { | ||
build_line "Skipping checksum verification on the archive we just created." | ||
return 0 | ||
} | ||
|
||
do_setup_environment() { | ||
push_runtime_env GEM_PATH "${pkg_prefix}/vendor" | ||
|
||
set_runtime_env APPBUNDLER_ALLOW_RVM "true" # prevent appbundler from clearing out the carefully constructed runtime GEM_PATH | ||
set_runtime_env LANG "en_US.UTF-8" | ||
set_runtime_env LC_CTYPE "en_US.UTF-8" | ||
} | ||
|
||
do_prepare() { | ||
export GEM_HOME="${pkg_prefix}/vendor" | ||
export CPPFLAGS="${CPPFLAGS} ${CFLAGS}" | ||
|
||
( cd "$CACHE_PATH" | ||
bundle config --local jobs "$(nproc)" | ||
bundle config --local without server docgen maintenance pry travis integration ci | ||
bundle config --local shebang "$(pkg_path_for "$_chef_client_ruby")/bin/ruby" | ||
bundle config --local retry 5 | ||
bundle config --local silence_root_warning 1 | ||
) | ||
|
||
build_line "Setting link for /usr/bin/env to 'coreutils'" | ||
if [ ! -f /usr/bin/env ]; then | ||
ln -s "$(pkg_interpreter_for core/coreutils bin/env)" /usr/bin/env | ||
fi | ||
do_unpack() { | ||
mkdir -pv "$HAB_CACHE_SRC_PATH/$pkg_dirname" | ||
cp -RT "$PLAN_CONTEXT"/.. "$HAB_CACHE_SRC_PATH/$pkg_dirname/" | ||
} | ||
|
||
do_build() { | ||
( cd "$CACHE_PATH" || exit_with "unable to enter hab-cache directory" 1 | ||
build_line "Installing gem dependencies ..." | ||
bundle install --jobs=3 --retry=3 | ||
build_line "Installing gems from git repos properly ..." | ||
build_line "Installing this project's gems ..." | ||
bundle exec rake install:local | ||
gem install chef-utils chef-config appbundler aruba kitchen-dokken | ||
) | ||
echo $(pkg_path_for $_chef_client_ruby) | ||
export GEM_HOME="$pkg_prefix/vendor/gems" | ||
|
||
build_line "Setting GEM_PATH=$GEM_HOME" | ||
export GEM_PATH="$GEM_HOME" | ||
bundle config --local without integration deploy maintenance | ||
bundle config --local jobs 4 | ||
bundle config --local retry 5 | ||
bundle config --local silence_root_warning 1 | ||
bundle install | ||
ruby ./post-bundle-install.rb | ||
gem build chef-test-kitchen-enterprise.gemspec | ||
} | ||
|
||
do_install() { | ||
( cd "$pkg_prefix" || exit_with "unable to enter pkg prefix directory" 1 | ||
export BUNDLE_GEMFILE="${CACHE_PATH}/Gemfile" | ||
build_line "** fixing binstub shebangs" | ||
fix_interpreter "${pkg_prefix}/vendor/bin/*" "$_chef_client_ruby" bin/ruby | ||
export BUNDLE_GEMFILE="${CACHE_PATH}/Gemfile" | ||
for gem in test-kitchen; do | ||
build_line "** generating binstubs for $gem with precise version pins" | ||
appbundler $CACHE_PATH $pkg_prefix/bin $gem | ||
done | ||
) | ||
export GEM_HOME="$pkg_prefix/vendor/gems" | ||
|
||
build_line "Setting GEM_PATH=$GEM_HOME" | ||
export GEM_PATH="$GEM_HOME" | ||
gem install chef-test-kitchen-enterprise-*.gem --no-document | ||
wrap_ruby_bin | ||
set_runtime_env "GEM_PATH" "${pkg_prefix}/vendor/gems" | ||
} | ||
|
||
do_after() { | ||
build_line "Trimming the fat ..." | ||
wrap_ruby_bin() { | ||
local bin="$pkg_prefix/bin/kitchen" | ||
local real_bin="$GEM_HOME/gems/chef-test-kitchen-enterprise-${pkg_version}/bin/kitchen" | ||
build_line "Adding wrapper $bin to $real_bin" | ||
cat <<EOF > "$bin" | ||
#!$(pkg_path_for core/bash)/bin/bash | ||
set -e | ||
|
||
# We don't need the cache of downloaded .gem files ... | ||
rm -r "$pkg_prefix/vendor/cache" | ||
# Set binary path that allows chef-test-kitchen-enterprise to use non-Hab pkg binaries | ||
export PATH="/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:\$PATH" | ||
|
||
# We don't need the gem docs. | ||
rm -r "$pkg_prefix/vendor/doc" | ||
# We don't need to ship the test suites for every gem dependency, | ||
# only Chef's for package verification. | ||
find "$pkg_prefix/vendor/gems" -name spec -type d | grep -v "chef-${pkg_version}" \ | ||
| while read spec_dir; do rm -r "$spec_dir"; done | ||
} | ||
# Set Ruby paths defined from 'do_setup_environment()' | ||
export GEM_HOME="$pkg_prefix/vendor/gems" | ||
|
||
do_end() { | ||
if [ "$(readlink /usr/bin/env)" = "$(pkg_interpreter_for core/coreutils bin/env)" ]; then | ||
build_line "Removing the symlink we created for '/usr/bin/env'" | ||
rm /usr/bin/env | ||
fi | ||
export GEM_PATH="$GEM_HOME" | ||
exec $(pkg_path_for $_chef_client_ruby)/bin/ruby $real_bin \$@ | ||
EOF | ||
chmod -v 755 "$bin" | ||
} | ||
|
||
do_strip() { | ||
|
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 |
---|---|---|
|
@@ -16,5 +16,5 @@ | |
# limitations under the License. | ||
|
||
module Kitchen | ||
VERSION = "3.7.1".freeze | ||
VERSION = "1.0.0".freeze | ||
end |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env ruby | ||
|
||
gem_home = Gem.paths.home | ||
|
||
puts "fixing bundle installed gems in #{gem_home}" | ||
|
||
# Install gems from git repos. This makes the assumption that there is a <gem_name>.gemspec and | ||
# you can simply gem build + gem install the resulting gem, so nothing fancy. This does not use | ||
# rake install since we need --conservative --minimal-deps in order to not install duplicate gems. | ||
# | ||
# | ||
puts "gem path #{gem_home}" | ||
|
||
Dir["#{gem_home}/bundler/gems/*"].each do |gempath| | ||
puts "#{gempath}" | ||
matches = File.basename(gempath).match(/.*-[A-Fa-f0-9]{12}/) | ||
next unless matches | ||
gem_name = File.basename(Dir["#{gempath}/*.gemspec"].first, ".gemspec") | ||
# FIXME: should strip any valid ruby platform off of the gem_name if it matches | ||
|
||
next unless gem_name | ||
|
||
puts "re-installing #{gem_name}..." | ||
|
||
Dir.chdir(gempath) do | ||
system("gem build #{gem_name}.gemspec") or raise "gem build failed" | ||
system("gem install #{gem_name}*.gem --conservative --minimal-deps --no-document") or raise "gem install failed" | ||
end | ||
|
||
end |
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why thor needs to be downgraded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inspec-core or train-core gem giving error with upgraded version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the comments why we downgraded that so that we can track it