From b52245baabc8dbc5a6adf489611aee89228330c2 Mon Sep 17 00:00:00 2001 From: syedimranhassan Date: Mon, 23 Oct 2023 15:19:31 +0500 Subject: [PATCH] chore: Remove secure repo and fetch secrets from AWS --- devops/resources/user-retirement-archiver.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/devops/resources/user-retirement-archiver.sh b/devops/resources/user-retirement-archiver.sh index 4c9787dfd..f4597481e 100644 --- a/devops/resources/user-retirement-archiver.sh +++ b/devops/resources/user-retirement-archiver.sh @@ -18,13 +18,13 @@ pip install -r util/jenkins/requirements.txt # hide the sensitive information in the logs set +x -SECRET_YAML=$(aws secretsmanager get-secret-value --secret-id "${SECRET_ARN}" --region "us-east-1" --output json | jq -r '.SecretString' | yq -y .) +CONFIG_YAML=$(aws secretsmanager get-secret-value --secret-id "${SECRET_ARN}" --region "us-east-1" --output json | jq -r '.SecretString' | yq -y .) # Create a temporary file to store the YAML -temp_yaml_file=$(mktemp $WORKSPACE/tempfile.XXXXXXXXXX.yml) +TEMP_CONFIG_YAML=$(mktemp $WORKSPACE/tempfile.XXXXXXXXXX.yml) # Write the YAML data to the temporary file -echo "$SECRET_YAML" > "$temp_yaml_file" +echo "$CONFIG_YAML" > "$TEMP_CONFIG_YAML" set -x @@ -41,7 +41,7 @@ fi # Call the script to read the retirement statuses from the LMS, send them to S3, and delete them from the LMS. python scripts/retirement_archive_and_cleanup.py \ - --config_file=$temp_yaml_file \ + --config_file=$TEMP_CONFIG_YAML \ --cool_off_days=$COOL_OFF_DAYS \ --batch_size=$BATCH_SIZE \ --start_date=$START_DATE \ @@ -49,4 +49,4 @@ python scripts/retirement_archive_and_cleanup.py \ --dry_run=$DRY_RUN # Remove the temporary file after processing -rm -f "$temp_yaml_file" +rm -f "$TEMP_CONFIG_YAML"