From c10de9c77150be4e7c2fce0c5dc4adda23007f5b Mon Sep 17 00:00:00 2001 From: Vivek Shankar Date: Tue, 17 Dec 2024 19:04:23 +0530 Subject: [PATCH] test ruby revert to ruby30 Signed-off-by: Vivek Shankar --- .expeditor/verify.pipeline.yml | 2 +- components/automate-backend-ctl/habitat/plan.sh | 4 ++-- components/automate-backend-deployment/habitat/plan.sh | 2 +- .../automate-backend-opensearch/habitat/config/sidecar | 2 +- components/automate-backend-opensearch/habitat/plan.sh | 2 +- components/automate-cluster-ctl/habitat/plan.sh | 4 ++-- .../automate-cluster-ctl/libexec/automate-cluster-ctl | 4 ++-- components/automate-cs-nginx/habitat/plan.sh | 6 +++--- components/automate-cs-oc-erchef/habitat/hooks/run | 2 +- scripts/credentials | 2 +- scripts/gather-logs | 2 +- scripts/smoke-test | 4 ++-- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index eb10328b937..7d4b4c3eda7 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -86,7 +86,7 @@ steps: - label: ":ruby: :buildkite: a2-ha-backend/automate-cluster-ctl" commands: - - gem install bundler:2.3.27 + - gem install bundler:1.16.6 - cd components/automate-cluster-ctl/; bundle install --jobs=3 --retry=3 - bundle exec rspec expeditor: diff --git a/components/automate-backend-ctl/habitat/plan.sh b/components/automate-backend-ctl/habitat/plan.sh index 0be054dcb2e..adab955af05 100644 --- a/components/automate-backend-ctl/habitat/plan.sh +++ b/components/automate-backend-ctl/habitat/plan.sh @@ -13,7 +13,7 @@ do_before() { } pkg_deps=( - core/ruby31 + core/ruby30 core/libffi chef/mlsa core/bash @@ -96,7 +96,7 @@ if test -n "\$DEBUG"; then set -x; fi export GEM_HOME="$GEM_HOME" export GEM_PATH="$GEM_PATH" unset RUBYOPT GEMRC -exec $(pkg_path_for ruby31)/bin/ruby -I $pkg_prefix/lib ${bin}.real \$@ +exec $(pkg_path_for ruby30)/bin/ruby -I $pkg_prefix/lib ${bin}.real \$@ EOF chmod -v 755 "$bin" } diff --git a/components/automate-backend-deployment/habitat/plan.sh b/components/automate-backend-deployment/habitat/plan.sh index f0e966642ea..58cb426d5ed 100644 --- a/components/automate-backend-deployment/habitat/plan.sh +++ b/components/automate-backend-deployment/habitat/plan.sh @@ -9,7 +9,7 @@ pkg_license=("Chef-MLSA") pkg_deps=( - core/ruby31 + core/ruby30 core/aws-cli core/bash core/coreutils diff --git a/components/automate-backend-opensearch/habitat/config/sidecar b/components/automate-backend-opensearch/habitat/config/sidecar index 2f677e61ba6..75a1528b9b6 100644 --- a/components/automate-backend-opensearch/habitat/config/sidecar +++ b/components/automate-backend-opensearch/habitat/config/sidecar @@ -1,4 +1,4 @@ #!{{pkgPathFor "core/bash"}}/bin/bash echo "------------- starting opensearch sidecar -------------------" -HAB_LICENSE=accept-no-persist GEM_PATH={{pkg.path}}/lib/gems {{pkgPathFor "core/ruby31"}}/bin/ruby {{pkg.path}}/bin/opensearch_sidecar.rb +HAB_LICENSE=accept-no-persist GEM_PATH={{pkg.path}}/lib/gems {{pkgPathFor "core/ruby30"}}/bin/ruby {{pkg.path}}/bin/opensearch_sidecar.rb echo "-------------------------------------------------------------" \ No newline at end of file diff --git a/components/automate-backend-opensearch/habitat/plan.sh b/components/automate-backend-opensearch/habitat/plan.sh index 3a0f39dc864..be2c58dc9eb 100644 --- a/components/automate-backend-opensearch/habitat/plan.sh +++ b/components/automate-backend-opensearch/habitat/plan.sh @@ -26,7 +26,7 @@ pkg_deps=( core/curl # health_check chef/automate-openjdk chef/automate-platform-tools - core/ruby31 + core/ruby30 ) pkg_interpreters=(bin/ruby) pkg_bin_dirs=(os/bin) diff --git a/components/automate-cluster-ctl/habitat/plan.sh b/components/automate-cluster-ctl/habitat/plan.sh index 86a40375e15..5ce673f9437 100644 --- a/components/automate-cluster-ctl/habitat/plan.sh +++ b/components/automate-cluster-ctl/habitat/plan.sh @@ -9,7 +9,7 @@ pkg_maintainer="Chef Software Inc. " pkg_license=("Chef-MLSA") pkg_deps=( - core/ruby31 + core/ruby30 core/aws-cli # chef/inspec/4.56.61 core/bash @@ -100,7 +100,7 @@ do_unpack() { } do_setup_environment() { - export GEM_HOME="$pkg_prefix/vendor/bundle/ruby/3.1.0" + export GEM_HOME="$pkg_prefix/vendor/bundle/ruby/3.0.0" export GEM_PATH="$GEM_HOME" set_runtime_env GEM_HOME "$GEM_HOME" diff --git a/components/automate-cluster-ctl/libexec/automate-cluster-ctl b/components/automate-cluster-ctl/libexec/automate-cluster-ctl index 2139b8c02a8..b1735c13307 100755 --- a/components/automate-cluster-ctl/libexec/automate-cluster-ctl +++ b/components/automate-cluster-ctl/libexec/automate-cluster-ctl @@ -43,8 +43,8 @@ export _CLUSTER_CTL_VERSION="${AUTOMATE_CLUSTER_VERSION:-DEV}" # If not provided to use set it to our vendor/bundle if [[ -z "${GEM_PATH}" ]]; then - export GEM_PATH="$_CLUSTER_CTL_ROOT/vendor/bundle/ruby/3.1.0" - export GEM_HOME="$_CLUSTER_CTL_ROOT/vendor/bundle/ruby/3.1.0" + export GEM_PATH="$_CLUSTER_CTL_ROOT/vendor/bundle/ruby/3.0.0" + export GEM_HOME="$_CLUSTER_CTL_ROOT/vendor/bundle/ruby/3.0.0" fi export PATH="${libexec_path}:$PATH" diff --git a/components/automate-cs-nginx/habitat/plan.sh b/components/automate-cs-nginx/habitat/plan.sh index de9639bc28f..988eae5d9be 100644 --- a/components/automate-cs-nginx/habitat/plan.sh +++ b/components/automate-cs-nginx/habitat/plan.sh @@ -20,7 +20,7 @@ pkg_deps=( # chef-server-* packages. # core/curl - core/ruby31 + core/ruby30 # WARNING: Version pin managed by .expeditor/update_chef_server.sh "${vendor_origin}/chef-server-nginx/15.10.21/20241126094216" "${vendor_origin}/chef-server-ctl/15.10.21/20241126093701" @@ -67,7 +67,7 @@ scaffolding_go_binary_list=( chef_automate_hab_binding_mode="relaxed" do_prepare() { - GO_LDFLAGS="-X main.RubyPath=$(pkg_path_for core/ruby31)" + GO_LDFLAGS="-X main.RubyPath=$(pkg_path_for core/ruby30)" GO_LDFLAGS="$GO_LDFLAGS -X main.ChefServerCtlPath=$(pkg_path_for chef/chef-server-ctl)" GO_LDFLAGS="$GO_LDFLAGS -X main.KnifePath=${pkg_prefix}/bin/knife" GO_LDFLAGS="$GO_LDFLAGS -X main.Version=${pkg_version}/${pkg_release}" @@ -83,6 +83,6 @@ do_install() { install "$PLAN_CONTEXT/bin/knife" "$wrapper_bin_path/knife" sed -i "s!__BUILDTIME_HAB_PKG_PATH_CHEF_SERVER_CTL__!$(pkg_path_for chef/chef-server-ctl)!g" "$wrapper_bin_path/knife" - sed -i "s!__BUILDTIME_HAB_PKG_PATH_RUBY__!$(pkg_path_for core/ruby31)!g" "$wrapper_bin_path/knife" + sed -i "s!__BUILDTIME_HAB_PKG_PATH_RUBY__!$(pkg_path_for core/ruby30)!g" "$wrapper_bin_path/knife" } diff --git a/components/automate-cs-oc-erchef/habitat/hooks/run b/components/automate-cs-oc-erchef/habitat/hooks/run index ad4a8d0041c..bc4fe89662f 100644 --- a/components/automate-cs-oc-erchef/habitat/hooks/run +++ b/components/automate-cs-oc-erchef/habitat/hooks/run @@ -48,7 +48,7 @@ HOME="{{pkg.svc_data_path}}" BUNDLE_GEMFILE="{{pkgPathFor "chef/oc_erchef"}}/Gem bundle exec ruby "{{pkg.svc_config_path}}/chef_server_data_bootstrap.rb" # ruby vars are needed in order to make depselector start up -export PATH={{pkgPathFor "core/ruby31"}}/bin:${PATH} +export PATH={{pkgPathFor "core/ruby30"}}/bin:${PATH} export LD_LIBRARY_PATH={{pkgPathFor "core/libffi"}}/lib:${LD_LIBRARY_PATH} export GEM_HOME={{pkgPathFor "chef/oc_erchef"}}/vendor/bundle export GEM_PATH={{pkgPathFor "chef/oc_erchef"}}/vendor/bundle diff --git a/scripts/credentials b/scripts/credentials index 5289d84e748..b811f34d64d 100755 --- a/scripts/credentials +++ b/scripts/credentials @@ -3,6 +3,6 @@ # Summary: Manage cluster credentials including ssl and passwords # Built-in help -RUBY_PATH=$(HAB_LICENSE=accept-no-persist hab pkg list --origin core | grep ruby31 | tail -1) +RUBY_PATH=$(HAB_LICENSE=accept-no-persist hab pkg list --origin core | grep ruby30 | tail -1) [ -d "./test/vendor/bundle" ] || (cd test && /hab/pkgs/$RUBY_PATH/bin/bundle install --path vendor/bundle) cd test && /hab/pkgs/$RUBY_PATH/bin/bundle exec /hab/pkgs/$RUBY_PATH/bin/ruby lib/credentials "$@" diff --git a/scripts/gather-logs b/scripts/gather-logs index 5f0c7811a8c..4f4445f6ebd 100755 --- a/scripts/gather-logs +++ b/scripts/gather-logs @@ -1,4 +1,4 @@ #!/usr/bin/env bash [ -d "./test/vendor/bundle" ] || (cd test && $(hab pkg path core30)/bin/bundle install --path vendor/bundle) -cd test && $(hab pkg path core/ruby31)/bin/bundle exec $(hab pkg path core/ruby31)/bin/ruby lib/gather-logs "$@" +cd test && $(hab pkg path core/ruby30)/bin/bundle exec $(hab pkg path core/ruby30)/bin/ruby lib/gather-logs "$@" diff --git a/scripts/smoke-test b/scripts/smoke-test index 6ee04b5d986..5d509241291 100755 --- a/scripts/smoke-test +++ b/scripts/smoke-test @@ -1,4 +1,4 @@ #!/usr/bin/env bash -[ -d "./test/vendor/bundle" ] || (cd test && $(hab pkg path core/ruby31)/bin/bundle install --path vendor/bundle) -cd test && $(hab pkg path core/ruby31)/bin/bundle exec $(hab pkg path core/ruby31)/bin/ruby lib/smoke-test "$@" +[ -d "./test/vendor/bundle" ] || (cd test && $(hab pkg path core/ruby30)/bin/bundle install --path vendor/bundle) +cd test && $(hab pkg path core/ruby30)/bin/bundle exec $(hab pkg path core/ruby30)/bin/ruby lib/smoke-test "$@"