Skip to content

Commit

Permalink
removed ec2 run in GHA (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
athiruma authored Jan 2, 2024
1 parent 4ddd578 commit 04c049d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ jobs:
strategy:
matrix:
region: ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'eu-central-1', 'ap-south-1', 'eu-north-1', 'ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'eu-south-1', 'eu-west-3', 'sa-east-1']
policy: ['ec2_idle', 'ec2_run', 'ebs_unattached', 'ebs_in_use']
policy: ['ec2_idle', 'instance_run', 'ebs_unattached', 'ebs_in_use']
# we don't run zombie_cluster_resource due to long run
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion jenkins/clouds/aws/daily/policies/run_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def get_policies(type: str = None):
{'account': 'PSAP', 'AWS_ACCESS_KEY_ID': AWS_ACCESS_KEY_ID_DELETE_PSAP,
'AWS_SECRET_ACCESS_KEY': AWS_SECRET_ACCESS_KEY_DELETE_PSAP, 'BUCKET_NAME': BUCKET_PSAP}]
policies.remove('ebs_in_use')
remove_polices = ['ec2_run', 'ebs_in_use', 'zombie_cluster_resource', 'ec2_idle', 'skipped_resources', 'ec2_stop'] # policies that will not aggregate
remove_polices = ['instance_run', 'ebs_in_use', 'zombie_cluster_resource', 'ec2_idle', 'skipped_resources', 'ec2_stop'] # policies that will not aggregate
policies = [policy.replace('_', '-') for policy in policies if policy not in remove_polices]
common_input_vars = {'PUBLIC_CLOUD_NAME': 'AWS', 'BUCKET_KEY': 'logs', 'KERBEROS_USERS': f"{special_user_mails}", 'LDAP_HOST_NAME': f"{LDAP_HOST_NAME}", 'log_level': "INFO", 'MAIL_ALERT_DAYS': "[4, 6, 7]", 'POLICY_ACTIONS_DAYS': "[7]", 'POLICIES_TO_ALERT': policies, 'es_host': ES_HOST, 'es_port': ES_PORT}
combine_vars = lambda item: f'{item[0]}="{item[1]}"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ def test_ebs_in_use_s3_upload():
policy_output = 's3://test-upload-data/test'
s3operations = S3Operations(region_name='us-east-1')
ebs_in_use = EbsInUse()
assert s3operations.save_results_to_s3(policy='ec2_run', policy_output=policy_output, policy_result=ebs_in_use.run()) is None
assert s3operations.save_results_to_s3(policy='ebs_in_use', policy_output=policy_output, policy_result=ebs_in_use.run()) is None

0 comments on commit 04c049d

Please sign in to comment.