From e3de4c9d214983d38a7d66e89dae5d4bba170ca3 Mon Sep 17 00:00:00 2001 From: Joanna Jeremicz Date: Wed, 21 Apr 2021 13:59:12 +0200 Subject: Integrate helm validator with SDC-BE - Read helm validator configuration - Add call to helm validator during Helm validation - Add JUnit tests - Fix display message when CNF upload is unsuccessful - Show warning messages from validation after CNF upload Issue-ID: SDC-3185 Signed-off-by: Joanna Jeremicz Change-Id: If197d557e6ddef4a07bef986d7cf133aedcb2cc5 Signed-off-by: Piotr Marcinkiewicz --- .../recipes/ON_5_setup_configuration.rb | 16 ++++++++++++++++ .../default/helmvalidator-configuration.yaml.erb | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/helmvalidator-configuration.yaml.erb (limited to 'openecomp-be/dist/sdc-onboard-backend-docker/artifacts') diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb index e7048427c7..17495687c8 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb @@ -42,6 +42,22 @@ template "VnfrepoConfiguration" do end +template "HelmValidatorConfiguration" do + path "#{ENV['JETTY_BASE']}/config/onboarding-be/config-helmvalidator.yaml" + source "helmvalidator-configuration.yaml.erb" + owner "jetty" + group "jetty" + mode "0755" + variables({ + :HVALIDATOR_ENABLED => node['HelmValidator']['validator_enabled'], + :HVALIDATOR_URL => node['HelmValidator']['validator_url'], + :HVALIDATOR_HELM_VERSION => node['HelmValidator']['helm_version'], + :HVALIDATOR_DEPLOYABLE => node['HelmValidator']['deployable'], + :HVALIDATOR_LINTABLE => node['HelmValidator']['lintable'], + :HVALIDATOR_STRICT_LINTABLE => node['HelmValidator']['strict_lintable'] + }) +end + template "ExternalTestingConfiguration" do path "#{ENV['JETTY_BASE']}/config/onboarding-be/externaltesting-configuration.yaml" diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/helmvalidator-configuration.yaml.erb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/helmvalidator-configuration.yaml.erb new file mode 100644 index 0000000000..37021c7a9a --- /dev/null +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/helmvalidator-configuration.yaml.erb @@ -0,0 +1,6 @@ +hValidatorEnabled: <%= @HVALIDATOR_ENABLED %> +hValidatorUrl: <%= @HVALIDATOR_URL %> +hValidatorVersion: <%= @HVALIDATOR_HELM_VERSION %> +hValidatorDeployable: <%= @HVALIDATOR_DEPLOYABLE %> +hValidatorLintable: <%= @HVALIDATOR_LINTABLE %> +hValidatorStrictLintable: <%= @HVALIDATOR_STRICT_LINTABLE %> -- cgit 1.2.3-korg