From db177f4ffa3595a4280c5e4dc440da2f93c691ce Mon Sep 17 00:00:00 2001 From: Eli Battat Date: Wed, 2 Jul 2025 19:08:05 +0300 Subject: [PATCH] fix skip policy alert --- cloud_governance/main/environment_variables.py | 2 +- jenkins/tenant/aws/ecoeng_01/PolicyJenkinsfileDaily | 4 ++-- jenkins/tenant/aws/ecoeng_02/PolicyJenkinsfileDaily | 2 +- jenkins/tenant/aws/ecoeng_03/PolicyJenkinsfileDaily | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cloud_governance/main/environment_variables.py b/cloud_governance/main/environment_variables.py index 6349c580..89a142db 100644 --- a/cloud_governance/main/environment_variables.py +++ b/cloud_governance/main/environment_variables.py @@ -283,7 +283,7 @@ def __init__(self): EnvironmentVariables.get_env('POLICIES_TO_ALERT', '[]')) self._environment_variables_dict['ADMIN_MAIL_LIST'] = EnvironmentVariables.get_env('ADMIN_MAIL_LIST', '') self._environment_variables_dict['SKIP_POLICIES_ALERT'] = literal_eval( - EnvironmentVariables.get_env('SKIP_POLICIES_ALERT', "['']")) + EnvironmentVariables.get_env('SKIP_POLICIES_ALERT', '[]')) if self._environment_variables_dict.get('policy') in ['send_aggregated_alerts', 'cloudability_cost_reports']: self._environment_variables_dict['COMMON_POLICIES'] = True # CRO -- Cloud Resource Orch diff --git a/jenkins/tenant/aws/ecoeng_01/PolicyJenkinsfileDaily b/jenkins/tenant/aws/ecoeng_01/PolicyJenkinsfileDaily index b1a2a1dd..e8444197 100644 --- a/jenkins/tenant/aws/ecoeng_01/PolicyJenkinsfileDaily +++ b/jenkins/tenant/aws/ecoeng_01/PolicyJenkinsfileDaily @@ -41,7 +41,7 @@ pipeline { // By default, all policies are running in dry_run="yes" mode and the whole list can be found in run_policies.py // POLICIES_IN_ACTION: Policies that run in the dry_run="no" mode POLICIES_IN_ACTION = '["unattached_volume", "ip_unattached", "zombie_snapshots", "unused_nat_gateway", "s3_inactive", "empty_roles", "zombie_cluster_resource"]' - SKIP_POLICIES_ALERT = '["unused_access_key"]' + SKIP_POLICIES_ALERT = ["unused_access_key"] } stages { stage('Checkout') { // Checkout (git clone ...) the projects repository @@ -80,7 +80,7 @@ pipeline { string(credentialsId: "${account}-aws-secret-key-id", variable: 'secret_key'), string(credentialsId: "${account}-s3-bucket", variable: 's3_bucket')]) { if (account == 'industry-partners') { - env.SKIP_POLICIES_ALERT = '[]' + env.SKIP_POLICIES_ALERT = [] } env.account_name = "${account}" env.ADMIN_MAIL_LIST = "${accounts_list[account]}" diff --git a/jenkins/tenant/aws/ecoeng_02/PolicyJenkinsfileDaily b/jenkins/tenant/aws/ecoeng_02/PolicyJenkinsfileDaily index 066dfbc4..3697c287 100644 --- a/jenkins/tenant/aws/ecoeng_02/PolicyJenkinsfileDaily +++ b/jenkins/tenant/aws/ecoeng_02/PolicyJenkinsfileDaily @@ -29,7 +29,7 @@ pipeline { // By default, all policies are running in dry_run="yes" mode and the whole list can be found in run_policies.py // POLICIES_IN_ACTION: Policies that run in the dry_run="no" mode POLICIES_IN_ACTION = '["unattached_volume", "ip_unattached", "zombie_snapshots", "unused_nat_gateway", "s3_inactive", "empty_roles", "zombie_cluster_resource"]' - SKIP_POLICIES_ALERT = '["unused_access_key"]' + SKIP_POLICIES_ALERT = ["unused_access_key"] } stages { stage('Checkout') { // Checkout (git clone ...) the projects repository diff --git a/jenkins/tenant/aws/ecoeng_03/PolicyJenkinsfileDaily b/jenkins/tenant/aws/ecoeng_03/PolicyJenkinsfileDaily index 9cd34d29..06a8dd85 100644 --- a/jenkins/tenant/aws/ecoeng_03/PolicyJenkinsfileDaily +++ b/jenkins/tenant/aws/ecoeng_03/PolicyJenkinsfileDaily @@ -26,7 +26,7 @@ pipeline { // By default, all policies are running in dry_run="yes" mode and the whole list can be found in run_policies.py // POLICIES_IN_ACTION: Policies that run in the dry_run="no" mode POLICIES_IN_ACTION = '["unattached_volume", "ip_unattached", "zombie_snapshots", "unused_nat_gateway", "s3_inactive", "empty_roles", "zombie_cluster_resource"]' - SKIP_POLICIES_ALERT = '["unused_access_key"]' + SKIP_POLICIES_ALERT = ["unused_access_key"] } stages { stage('Checkout') { // Checkout (git clone ...) the projects repository