Skip to content
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

Remove cucumber, dco, knife-spork #417

Merged
merged 5 commits into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions components/gems/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source "https://rubygems.org"

# gemspec

gem "bundler"
gem "bundler", "< 2"

group(:omnibus_package, :development, :test) do
# we pin these gems as they are installed in the ruby source and if we let them
Expand Down Expand Up @@ -81,7 +81,6 @@ group(:omnibus_package) do
gem "net-ssh", ">= 4.2.0"
gem "test-kitchen", ">= 2.0"
gem "listen"
gem "dco" # TODO - dksplit - Planned for removal

# many layers down these bring in ethon which uses ffi / libcurl and breaks on windows
# we want to get this working, but for now it's disabled so we can get a build out
Expand All @@ -93,7 +92,7 @@ group(:omnibus_package) do
gem "ed25519"
gem "bcrypt_pbkdf"

gem "chef-cli", ">= 1.0.3"
gem "chef-cli", ">= 1.0.9"

gem "chef-apply", ">= 0.3.3"

Expand All @@ -106,7 +105,6 @@ group(:omnibus_package) do
gem "knife-push"

# All of the following used to be software definitions we included:
gem "knife-spork" # TODO - dksplit - Planned for removal
gem "mixlib-install"
gem "nokogiri"
gem "pry-byebug"
Expand All @@ -116,7 +114,6 @@ group(:omnibus_package) do
gem "rubocop"
gem "winrm-fs"
gem "winrm-elevated"
gem "cucumber" # TODO - dksplit - Planned for removal
gem "stove"
end

Expand All @@ -132,8 +129,7 @@ end

gem "chefstyle", group: :test

# TODO delete this when we figure out how to include the pushy windows dependencies
# correctly
# Ensure support for push-client on Windows
platforms :mswin, :mingw do
gem "rdp-ruby-wmi"
gem "windows-pr"
Expand Down
52 changes: 13 additions & 39 deletions components/gems/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ GEM
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
app_conf (0.4.2)
appbundler (0.13.1)
mixlib-cli (>= 1.4, < 3.0)
mixlib-shellout (>= 2.0, < 4.0)
artifactory (3.0.0)
ast (2.4.0)
aws-eventstream (1.0.3)
aws-partitions (1.189.0)
aws-partitions (1.190.0)
aws-sdk-apigateway (1.33.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
Expand Down Expand Up @@ -52,13 +51,13 @@ GEM
aws-sdk-codecommit (1.25.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sdk-codedeploy (1.24.0)
aws-sdk-codedeploy (1.25.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sdk-codepipeline (1.22.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sdk-configservice (1.33.0)
aws-sdk-configservice (1.34.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sdk-core (3.59.0)
Expand All @@ -78,13 +77,13 @@ GEM
aws-sdk-ecr (1.19.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sdk-ecs (1.43.0)
aws-sdk-ecs (1.44.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sdk-eks (1.23.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sdk-elasticache (1.21.0)
aws-sdk-elasticache (1.22.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sdk-elasticbeanstalk (1.24.0)
Expand Down Expand Up @@ -151,7 +150,7 @@ GEM
aws-sdk-sns (1.18.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sdk-sqs (1.18.0)
aws-sdk-sqs (1.19.0)
aws-sdk-core (~> 3, >= 3.58.0)
aws-sigv4 (~> 1.1)
aws-sdk-ssm (1.52.0)
Expand Down Expand Up @@ -283,7 +282,7 @@ GEM
tty-spinner
chef-bin (15.1.36)
chef (= 15.1.36)
chef-cli (1.0.6)
chef-cli (1.0.9)
addressable (>= 2.3.5, < 2.6)
chef (>= 14.0)
cookbook-omnifetch (~> 0.5)
Expand Down Expand Up @@ -334,25 +333,11 @@ GEM
mixlib-archive (>= 0.4, < 2.0)
cookstyle (5.0.4)
rubocop (= 0.72.0)
cucumber (3.1.2)
builder (>= 2.1.2)
cucumber-core (~> 3.2.0)
cucumber-expressions (~> 6.0.1)
cucumber-wire (~> 0.0.1)
diff-lcs (~> 1.3)
gherkin (~> 5.1.0)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
cucumber-core (3.2.1)
backports (>= 3.8.0)
cucumber-tag_expressions (~> 1.1.0)
gherkin (~> 5.0)
cucumber-expressions (6.0.1)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
dco (1.0.1)
git (~> 1.3)
thor (~> 0.19)
debug_inspector (0.0.3)
declarative (0.0.10)
declarative-option (0.1.0)
Expand All @@ -363,7 +348,6 @@ GEM
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.3)
diffy (3.3.0)
docker-api (1.34.2)
excon (>= 0.47.0)
multi_json
Expand Down Expand Up @@ -416,7 +400,6 @@ GEM
gcewinpass (1.1.0)
google-api-client (~> 0.13)
gherkin (5.1.0)
git (1.5.0)
google-api-client (0.23.9)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.7.0)
Expand Down Expand Up @@ -463,7 +446,7 @@ GEM
ice_nine (0.11.2)
inifile (3.0.0)
iniparse (1.4.4)
inspec (4.7.3)
inspec (4.7.18)
addressable (~> 2.4)
faraday (>= 0.9.0)
faraday_middleware (~> 0.12.2)
Expand All @@ -490,8 +473,8 @@ GEM
train-habitat (~> 0.1)
tty-prompt (~> 0.17)
tty-table (~> 0.10)
inspec-bin (4.7.3)
inspec (= 4.7.3)
inspec-bin (4.7.18)
inspec (= 4.7.18)
ipaddress (0.8.3)
iso8601 (0.12.1)
jaro_winkler (1.5.3)
Expand Down Expand Up @@ -547,11 +530,6 @@ GEM
knife-opc (0.4.1)
knife-push (1.1.2)
chef (>= 13.0)
knife-spork (1.7.2)
app_conf (>= 0.4.0)
chef (>= 11.0.0)
diffy (>= 3.0.1)
git (>= 1.2.5)
knife-tidy (2.0.1)
knife-vsphere (3.0.1)
chef-vault (>= 2.6.0)
Expand Down Expand Up @@ -618,7 +596,6 @@ GEM
ms_rest (~> 0.7.4)
unf_ext (= 0.0.7.2)
multi_json (1.13.1)
multi_test (0.1.2)
multipart-post (2.1.1)
necromancer (0.4.0)
nenv (0.3.0)
Expand Down Expand Up @@ -789,7 +766,7 @@ GEM
thread_safe (0.3.6)
timeliness (0.3.10)
timers (4.3.0)
tins (1.21.0)
tins (1.21.1)
toml-rb (1.1.2)
citrus (~> 3.0, > 3.0)
tomlrb (1.2.8)
Expand Down Expand Up @@ -968,19 +945,17 @@ DEPENDENCIES
artifactory
bcrypt_pbkdf
berkshelf (>= 7.0.5)
bundler
bundler (< 2)
chef (= 15.1.36)
chef-apply (>= 0.3.3)
chef-bin (= 15.1.36)
chef-cli (>= 1.0.3)
chef-cli (>= 1.0.9)
chef-sugar
chef-vault (>= 3.4.1)
cheffish (>= 14.0.1)
chefspec (>= 8.0.0)
chefstyle
cookstyle (~> 5.0)
cucumber
dco
dep-selector-libgecode
dep_selector
ed25519
Expand All @@ -1004,7 +979,6 @@ DEPENDENCIES
knife-google (>= 3.3.3)
knife-opc (>= 0.4.0)
knife-push
knife-spork
knife-tidy (>= 1.2.0)
knife-vsphere (>= 2.1.1)
knife-windows (>= 3.0)
Expand Down
22 changes: 13 additions & 9 deletions omnibus/config/software/gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

dependency "ruby"
dependency "rubygems"
# Removed - r26 ships with bundler
# dependency "bundler" # technically a gem, but we gotta solve the chicken-egg problem here
# Remove? - r26 ships with bundler
dependency "bundler" # technically a gem, but we gotta solve the chicken-egg problem here

#
# NOTE: Do not add any gem dependencies here. This will cause gemsets to solve without
Expand All @@ -49,10 +49,6 @@

build do
env = with_standard_compiler_flags(with_embedded_path)
# Cross platform way to sed. Need to cleanup the backup fail.
# TODO - check what our version output/bheaviors look like then figure out best approach
# command("sed -i.bak 's/\\$CHEF_WS_VERSION\\$/#{project.build_version}/' #{project_dir}/lib/chef-dk/cli.rb", env: env)
# command("rm #{project_dir}/lib/chef-dk/cli.rb.bak")

# TODO - reevaluate groups
excluded_groups = %w{server docgen maintenance pry travis integration ci}
Expand All @@ -62,15 +58,23 @@
# install the whole bundle first
bundle "install --jobs 10 --without #{excluded_groups.join(" ")}", env: env

# TODO - we'll want a better way to manage this - likely some kind of callback
# from chef-cli so that we can hook in our own version output.
#
# Cross platform way to sed. Need to cleanup the backup fail.
# command("sed -i.bak 's/\\$CHEF_WS_VERSION\\$/#{project.build_version}/' #{project_dir}/lib/chef-dk/cli.rb", env: env)
# command("rm #{project_dir}/lib/chef-dk/cli.rb.bak")
appbundle "chef", lockdir: project_dir, gem: "chef", without: %w{docgen chefstyle}, env: env

appbundle "foodcritic", lockdir: project_dir, gem: "foodcritic", without: %w{development}, env: env
appbundle "test-kitchen", lockdir: project_dir, gem: "test-kitchen", without: %w{changelog debug docs}, env: env
appbundle "foodcritic", lockdir: project_dir, gem: "foodcritic", without: %w{development test}, env: env
appbundle "test-kitchen", lockdir: project_dir, gem: "test-kitchen", without: %w{changelog debug docs development}, env: env
appbundle "inspec", lockdir: project_dir, gem: "inspec-bin", without: %w{deploy tools maintenance integration}, env: env
appbundle "chef-run", lockdir: project_dir, gem: "chef-apply", without: %w{changelog docs debug}, env: env
appbundle "chef-cli", lockdir: project_dir, gem: "chef-cli", without: %w{changelog docs debug}, env: env
appbundle "berkshelf", lockdir: project_dir, gem: "berkshelf", without: %w{changelog docs debug development}, env: env

%w{chef-bin chef-apply chef-vault ohai opscode-pushy-client cookstyle dco berkshelf}.each do |gem|
# Note - 'chef-apply' gem provides 'chef-run', not 'chef-apply' which ships with chef-bin...
%w{chef-bin chef-apply chef-vault ohai opscode-pushy-client cookstyle}.each do |gem|
appbundle gem, lockdir: project_dir, gem: gem, without: %w{changelog}, env: env
end

Expand Down
7 changes: 3 additions & 4 deletions omnibus/package-scripts/chef-workstation/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ error_exit()

is_darwin()
{
uname -v | grep "^Darwin" 2>&1 >/dev/null
uname -v | grep "^Darwin" >/dev/null 2>&1
}

if is_darwin; then
Expand All @@ -25,11 +25,10 @@ else
PREFIX="/usr"
fi

chefdk_binaries="berks chef chef-apply chef-shell chef-solo chef-vault cookstyle dco delivery foodcritic inspec kitchen knife ohai push-apply pushy-client pushy-service-manager chef-client"
binaries="chef-run $chefdk_binaries"
binaries="chef-run berks chef chef-apply chef-shell chef-solo chef-vault cookstyle delivery foodcritic inspec kitchen knife ohai push-apply pushy-client pushy-service-manager chef-client"

for binary in $binaries; do
ln -sf $INSTALLER_DIR/bin/$binary $PREFIX/bin || error_exit "Cannot link $binary to $PREFIX/bin"
ln -sf "$INSTALLER_DIR/bin/$binary" $PREFIX/bin || error_exit "Cannot link $binary to $PREFIX/bin"
done

if is_darwin; then
Expand Down
4 changes: 2 additions & 2 deletions omnibus/package-scripts/chef-workstation/preinst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if is_darwin; then
rm -rf '/opt/chefdk'
echo "Removing binary links in /usr/local/bin"
find /usr/local/bin -lname '/opt/chefdk/*' -delete
echo "Forgeting $pkgId"
echo "Forgetting $pkgId"
pkgutil --forget $pkgId
fi
fi
fi