Skip to content

Commit

Permalink
Merge pull request #1403 from CMSgov/feature/QPPSE-266_Automate-parti…
Browse files Browse the repository at this point in the history
…cipation-file

[QPPSE-266]: Participation File Automation
  • Loading branch information
saquino0827 authored Dec 14, 2023
2 parents ba9b4d4 + cee855e commit bf7379e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ env:
DOCKERHUB_USERNAME: "/qppar-sf/DOCKERHUB_USERNAME"
DOCKERHUB_PASS: "/qppar-sf/DOCKERHUB_PASS"
SLACK_WEBHOOK: "/qppar-sf/dev/conversion_tool/slack_hook_url"
PART_FILE_BUCKET: "/qppar-sf/$ENVIRONMENT/conversion_tool/CPC_PLUS_BUCKET_NAME"
OUTPUT_PART_FILE: "/qppar-sf/$ENVIRONMENT/conversion_tool/CPC_PLUS_VALIDATION_FILE"
phases:
install:
runtime-versions:
Expand All @@ -23,6 +25,10 @@ phases:
- echo Getting Certificates for ${ENVIRONMENT}
- chmod +x ./qppsfct-copy-certs.sh
- ./qppsfct-copy-certs.sh $ENVIRONMENT $AWS_DEFAULT_REGION
- pip install openpyxl
- echo "Updating participation file"
- chmod +x ./upload-part-file.sh
- ./upload-part-file.sh $PART_FILE_BUCKET $PART_FILE $OUTPUT_PART_FILE $AWS_DEFAULT_REGION
- echo "Logging in to Amazon dockerHub ECR"
- docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASS
- aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com
Expand Down
4 changes: 2 additions & 2 deletions upload-part-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export AWS_REGION=${AWS_REGION}
pip install openpyxl
pip install simplejson

#chmod +x ./tools/scripts/retrieve-fms-file.py
#python ./tools/scripts/retrieve-fms-file.py -au ${AUTH_URL} -fu ${FMS_URL} -t ${FMS_TOKEN} -p ${FMS_PATH}
aws s3 cp s3://${PART_FILE_BUCKET}/${PART_FILE} .
#chmod +x ./tools/scripts/retrieve-fms-file.py
chmod +x ./tools/scripts/format-participation-file.py
#python ./tools/scripts/retrieve-fms-file.py -au ${AUTH_URL} -fu ${FMS_URL} -t ${FMS_TOKEN} -p ${FMS_PATH}
python ./tools/scripts/format-participation-file.py ${PART_FILE} ${FORMATTED_FILE_NAME}
aws s3 mv ${FORMATTED_FILE_NAME} s3://${PART_FILE_BUCKET}/${FORMATTED_FILE_NAME}

Expand Down

0 comments on commit bf7379e

Please sign in to comment.