Use integration-java11 Dockerfile
[sdc.git] / catalog-be / sdc-backend-init / chef-repo / cookbooks / sdc-catalog-be-setup / recipes / 3_import_Normatives.rb
index 0abda0d..be32e98 100644 (file)
@@ -26,21 +26,8 @@ cookbook_file "/var/tmp/normatives.tar.gz" do
   source "normatives.tar.gz"
 end
 
-bash "executing-import_Normatives" do
-  code <<-EOH
-    set -ex
-
-    cd /var/tmp/
-    tar -xvf normatives.tar.gz
-    
-    # executing the normatives
-    # add --debug to the sdcinit command to enable debug
-
-    cd /var/tmp/normatives/import/tosca
-    sdcinit #{param} #{basic_auth_config} > /var/lib/jetty/logs/init.log
-    rc=$?
-    if [[ $rc != 0 ]]; then exit $rc; fi
-
-  EOH
-  returns [0]
+execute "create-jetty-modules" do
+  command "set -ex && tar -xvf normatives.tar.gz && cd /var/tmp/normatives/import/tosca && sdcinit #{param} #{basic_auth_config} > #{ENV['ONAP_LOG']}/init.log"
+  cwd "/var/tmp/"
+  action :run
 end