From 81732a20b8df96cd6db9deb5885bf31f81076d01 Mon Sep 17 00:00:00 2001 From: Robert Gottlieb Date: Tue, 3 Dec 2024 11:56:16 -0500 Subject: [PATCH] more debugging --- ci/aws-iam-check-keys/find_stale_keys.py | 5 ++++- ci/pipeline.yml | 10 +++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ci/aws-iam-check-keys/find_stale_keys.py b/ci/aws-iam-check-keys/find_stale_keys.py index cfc1db7..59a09cd 100644 --- a/ci/aws-iam-check-keys/find_stale_keys.py +++ b/ci/aws-iam-check-keys/find_stale_keys.py @@ -303,7 +303,10 @@ def send_key(key_dict: dict, severity: str): Send the key(s) to the pushgateway client to let it determine if they are stale """ - gateway = f'{env.str("GATEWAY_HOST")}:{env.str("GATEWAY_PORT", "9091")}' + gateway_test = f"{env.str('GATEWAY_HOST')}:9091" + print(gateway_test) + gateway = f"{env.str('GATEWAY_HOST')}:{env.int('GATEWAY_PORT', 9091)}" + print(gateway) registry = CollectorRegistry() days_since_rotation = key_dict["days_since_rotation"] # user_type = key_dict["user_type"] diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 723cea1..6e33dad 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -134,13 +134,6 @@ jobs: PREFIX_DELIMITER: ((aws-iam-prefix-delimiter)) WARN_DAYS: ((aws-iam-warn-days)) VIOLATION_DAYS: ((aws-iam-violation-days)) - on_success: - put: slack - params: - <<: *slack-success-params - text: | - :white_check_mark: Successfully ran IAM Check Keys in production - <$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details> on_failure: put: slack params: @@ -148,6 +141,9 @@ jobs: text: | :x: FAILED to deploy IAM Check Keys on production <$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details> + channel: "#cg-platform-news" + username: ((slack-username)) + icon_url: ((slack-icon-url)) - name: aws-mfa-check serial_groups: [production]