From 2717498943566b1d89126bc6eab786db22652d0d Mon Sep 17 00:00:00 2001 From: RoyShravani Date: Fri, 3 Jan 2025 12:13:21 +0530 Subject: [PATCH 01/12] removing the build callback in plan.sh Signed-off-by: RoyShravani --- components/automate-cs-ocid/habitat/plan.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/automate-cs-ocid/habitat/plan.sh b/components/automate-cs-ocid/habitat/plan.sh index 10425d05ded..03a3aeae20a 100644 --- a/components/automate-cs-ocid/habitat/plan.sh +++ b/components/automate-cs-ocid/habitat/plan.sh @@ -43,9 +43,10 @@ do_download() { return 0 } -do_build() { - return 0 -} +# Testing with removing this callback as we don't need to build anything +# do_build() { +# return 0 +# } do_install() { return 0 From e2ba91a9bfd406f691bab78806076d6a2ddfeb5a Mon Sep 17 00:00:00 2001 From: RoyShravani Date: Thu, 9 Jan 2025 12:12:11 +0530 Subject: [PATCH 02/12] removing bundle config from run hook Signed-off-by: RoyShravani --- components/automate-cs-ocid/habitat/hooks/run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/automate-cs-ocid/habitat/hooks/run b/components/automate-cs-ocid/habitat/hooks/run index ddc5367fb52..ea704e4c939 100644 --- a/components/automate-cs-ocid/habitat/hooks/run +++ b/components/automate-cs-ocid/habitat/hooks/run @@ -10,7 +10,8 @@ cp "{{pkg.svc_config_path}}/tasks/oauth_application.rake" $(hab pkg path "chef/o cd {{pkgPathFor "chef/oc_id"}}/oc_id -bundle config path "vendor/bundle" +# Suspecting that the bundle path is not getting set correctly due to which .bundle is getting created in the root directory +# bundle config path "vendor/bundle" export RAILS_ENV="{{cfg.rails_env}}" export RACK_ENV="{{cfg.rack_env}}" From 0d6bff551e45367e196178f8aa7121d4dd7e4d01 Mon Sep 17 00:00:00 2001 From: RoyShravani Date: Thu, 9 Jan 2025 12:14:24 +0530 Subject: [PATCH 03/12] revert Signed-off-by: RoyShravani --- components/automate-cs-ocid/habitat/plan.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/automate-cs-ocid/habitat/plan.sh b/components/automate-cs-ocid/habitat/plan.sh index 03a3aeae20a..10425d05ded 100644 --- a/components/automate-cs-ocid/habitat/plan.sh +++ b/components/automate-cs-ocid/habitat/plan.sh @@ -43,10 +43,9 @@ do_download() { return 0 } -# Testing with removing this callback as we don't need to build anything -# do_build() { -# return 0 -# } +do_build() { + return 0 +} do_install() { return 0 From 53daeb9b4beaa03fd520a79264ba0ba20a201272 Mon Sep 17 00:00:00 2001 From: RoyShravani Date: Thu, 9 Jan 2025 16:25:42 +0530 Subject: [PATCH 04/12] adding BUNDLE_APP_CONFIG env var Signed-off-by: RoyShravani --- components/automate-cs-ocid/habitat/hooks/run | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/automate-cs-ocid/habitat/hooks/run b/components/automate-cs-ocid/habitat/hooks/run index ea704e4c939..62d9639a410 100644 --- a/components/automate-cs-ocid/habitat/hooks/run +++ b/components/automate-cs-ocid/habitat/hooks/run @@ -11,7 +11,9 @@ cp "{{pkg.svc_config_path}}/tasks/oauth_application.rake" $(hab pkg path "chef/o cd {{pkgPathFor "chef/oc_id"}}/oc_id # Suspecting that the bundle path is not getting set correctly due to which .bundle is getting created in the root directory -# bundle config path "vendor/bundle" +# Set the BUNDLE_APP_CONFIG environment variable to a ocid directory +export BUNDLE_APP_CONFIG="{{pkgPathFor "chef/oc_id"}}/oc_id/.bundle" +bundle config path "vendor/bundle" export RAILS_ENV="{{cfg.rails_env}}" export RACK_ENV="{{cfg.rack_env}}" From f063504042b06b416b7b9b0b46bd74227432bc0d Mon Sep 17 00:00:00 2001 From: RoyShravani Date: Thu, 9 Jan 2025 20:34:51 +0530 Subject: [PATCH 05/12] removing the file Signed-off-by: RoyShravani --- components/automate-cs-ocid/habitat/hooks/run | 2 +- components/automate-cs-ocid/habitat/plan.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/automate-cs-ocid/habitat/hooks/run b/components/automate-cs-ocid/habitat/hooks/run index 62d9639a410..3734a4f4acc 100644 --- a/components/automate-cs-ocid/habitat/hooks/run +++ b/components/automate-cs-ocid/habitat/hooks/run @@ -12,7 +12,7 @@ cd {{pkgPathFor "chef/oc_id"}}/oc_id # Suspecting that the bundle path is not getting set correctly due to which .bundle is getting created in the root directory # Set the BUNDLE_APP_CONFIG environment variable to a ocid directory -export BUNDLE_APP_CONFIG="{{pkgPathFor "chef/oc_id"}}/oc_id/.bundle" +# export BUNDLE_APP_CONFIG="{{pkgPathFor "chef/oc_id"}}/oc_id/.bundle" bundle config path "vendor/bundle" export RAILS_ENV="{{cfg.rails_env}}" diff --git a/components/automate-cs-ocid/habitat/plan.sh b/components/automate-cs-ocid/habitat/plan.sh index 10425d05ded..851100f6901 100644 --- a/components/automate-cs-ocid/habitat/plan.sh +++ b/components/automate-cs-ocid/habitat/plan.sh @@ -51,3 +51,10 @@ do_install() { return 0 } +do_end() { + if [ -d "/root/.bundle" ]; then + # Remove the .bundle directory + rm -rf /root/.bundle + echo ".bundle directory in /root has been removed." + fi +} From a4e706f233b9f32dfc4ea2af110bf0c2b46ac60e Mon Sep 17 00:00:00 2001 From: RoyShravani Date: Fri, 10 Jan 2025 13:30:24 +0530 Subject: [PATCH 06/12] adding local path to bundle config Signed-off-by: RoyShravani --- components/automate-cs-ocid/habitat/hooks/run | 5 ++--- components/automate-cs-ocid/habitat/plan.sh | 8 -------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/components/automate-cs-ocid/habitat/hooks/run b/components/automate-cs-ocid/habitat/hooks/run index 3734a4f4acc..43a289aea5c 100644 --- a/components/automate-cs-ocid/habitat/hooks/run +++ b/components/automate-cs-ocid/habitat/hooks/run @@ -11,9 +11,8 @@ cp "{{pkg.svc_config_path}}/tasks/oauth_application.rake" $(hab pkg path "chef/o cd {{pkgPathFor "chef/oc_id"}}/oc_id # Suspecting that the bundle path is not getting set correctly due to which .bundle is getting created in the root directory -# Set the BUNDLE_APP_CONFIG environment variable to a ocid directory -# export BUNDLE_APP_CONFIG="{{pkgPathFor "chef/oc_id"}}/oc_id/.bundle" -bundle config path "vendor/bundle" +# Suspecting that the bundle path is not getting set correctly due to which .bundle is getting created in the root directory +bundle config set --local path "vendor/bundle" export RAILS_ENV="{{cfg.rails_env}}" export RACK_ENV="{{cfg.rack_env}}" diff --git a/components/automate-cs-ocid/habitat/plan.sh b/components/automate-cs-ocid/habitat/plan.sh index 851100f6901..6e31a88ff2d 100644 --- a/components/automate-cs-ocid/habitat/plan.sh +++ b/components/automate-cs-ocid/habitat/plan.sh @@ -50,11 +50,3 @@ do_build() { do_install() { return 0 } - -do_end() { - if [ -d "/root/.bundle" ]; then - # Remove the .bundle directory - rm -rf /root/.bundle - echo ".bundle directory in /root has been removed." - fi -} From f91ea454ea00dc01a7453d9af7ac027f41da56e0 Mon Sep 17 00:00:00 2001 From: RoyShravani Date: Wed, 15 Jan 2025 12:22:59 +0530 Subject: [PATCH 07/12] nit Signed-off-by: RoyShravani --- components/automate-cs-ocid/habitat/hooks/run | 1 - 1 file changed, 1 deletion(-) diff --git a/components/automate-cs-ocid/habitat/hooks/run b/components/automate-cs-ocid/habitat/hooks/run index 43a289aea5c..450000509ba 100644 --- a/components/automate-cs-ocid/habitat/hooks/run +++ b/components/automate-cs-ocid/habitat/hooks/run @@ -10,7 +10,6 @@ cp "{{pkg.svc_config_path}}/tasks/oauth_application.rake" $(hab pkg path "chef/o cd {{pkgPathFor "chef/oc_id"}}/oc_id -# Suspecting that the bundle path is not getting set correctly due to which .bundle is getting created in the root directory # Suspecting that the bundle path is not getting set correctly due to which .bundle is getting created in the root directory bundle config set --local path "vendor/bundle" From 4af0c11f38c01a4cb69ff9a4aecf745d9685573f Mon Sep 17 00:00:00 2001 From: RoyShravani Date: Wed, 15 Jan 2025 16:46:10 +0530 Subject: [PATCH 08/12] nit Signed-off-by: RoyShravani --- components/automate-cs-ocid/habitat/plan.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/components/automate-cs-ocid/habitat/plan.sh b/components/automate-cs-ocid/habitat/plan.sh index 6e31a88ff2d..10425d05ded 100644 --- a/components/automate-cs-ocid/habitat/plan.sh +++ b/components/automate-cs-ocid/habitat/plan.sh @@ -50,3 +50,4 @@ do_build() { do_install() { return 0 } + From 9e9ae6e94e11ab12bcff68054edbf0d19f8690e3 Mon Sep 17 00:00:00 2001 From: RoyShravani Date: Wed, 15 Jan 2025 16:47:32 +0530 Subject: [PATCH 09/12] nit Signed-off-by: RoyShravani --- components/automate-cs-ocid/habitat/hooks/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/automate-cs-ocid/habitat/hooks/run b/components/automate-cs-ocid/habitat/hooks/run index 450000509ba..6c8ca777e7e 100644 --- a/components/automate-cs-ocid/habitat/hooks/run +++ b/components/automate-cs-ocid/habitat/hooks/run @@ -10,7 +10,7 @@ cp "{{pkg.svc_config_path}}/tasks/oauth_application.rake" $(hab pkg path "chef/o cd {{pkgPathFor "chef/oc_id"}}/oc_id -# Suspecting that the bundle path is not getting set correctly due to which .bundle is getting created in the root directory +# upgrading the bundle config syntax as per the latest bundler version bundle config set --local path "vendor/bundle" export RAILS_ENV="{{cfg.rails_env}}" From e6b1cdf528ebf958f7443fd2d09fddf34b9567e3 Mon Sep 17 00:00:00 2001 From: RoyShravani Date: Wed, 15 Jan 2025 17:21:20 +0530 Subject: [PATCH 10/12] fixing ocid integration test Signed-off-by: RoyShravani --- .studio/chef-server-collection | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.studio/chef-server-collection b/.studio/chef-server-collection index c32fcb0a7e4..d718642f161 100644 --- a/.studio/chef-server-collection +++ b/.studio/chef-server-collection @@ -392,6 +392,21 @@ function test_knife() { done } +document "ohai_time" < Date: Wed, 15 Jan 2025 17:34:32 +0530 Subject: [PATCH 11/12] revert Signed-off-by: RoyShravani --- .studio/chef-server-collection | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.studio/chef-server-collection b/.studio/chef-server-collection index d718642f161..4b17336e247 100644 --- a/.studio/chef-server-collection +++ b/.studio/chef-server-collection @@ -392,21 +392,6 @@ function test_knife() { done } -document "ohai_time" < Date: Thu, 16 Jan 2025 19:50:15 +0530 Subject: [PATCH 12/12] adding exception to license scout Signed-off-by: RoyShravani --- .license_scout.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.license_scout.yml b/.license_scout.yml index 3975a325101..c4e2755f11c 100644 --- a/.license_scout.yml +++ b/.license_scout.yml @@ -1535,6 +1535,10 @@ exceptions: reason: Ruby license (previously shipped in Automate 1) - name: core/ruby27 reason: Exception made for chef server upgrade + - name: core/libmpc + reason: Exception made for notifications-service upgrade + - name: core/ruby3_1 + reason: Ruby license (previously shipped in Automate 1) ruby: - name: highline