generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdo_sqs.sh
34 lines (33 loc) · 2.94 KB
/
do_sqs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
run_in_docker="$1"
echo $run_in_docker
if [ ! -z "$run_in_docker" ]
then
docker kill local_validation_run
docker rm local_validation_run
docker build --platform linux/amd64 -t local_validation_run:latest -f Local_Dockerfile .
docker run -d --platform linux/amd64 --network sbl-project_default -v /tmp/filing_bucket/upload/:/tmp/filing_bucket/upload/ -e ENV=LOCAL -e DB_NAME=filing -e DB_USER=filing_user -e DB_PWD=filing_user -e DB_HOST=pg --name local_validation_run local_validation_run:latest
docker container ls
else
docker build --platform linux/amd64 -t sqs-parquet:latest -f SQS_Dockerfile --build-arg SQS_PATH=src/sbl_validation_processor/sqs_csv_to_parquet .
docker build --platform linux/amd64 -t sqs-validate:latest -f SQS_Dockerfile --build-arg SQS_PATH=src/sbl_validation_processor/sqs_parquet_validation .
docker build --platform linux/amd64 -t sqs-aggregator:latest -f SQS_Dockerfile --build-arg SQS_PATH=src/sbl_validation_processor/sqs_validation_aggregator .
docker build --platform linux/amd64 -t sqs-parquet-job:latest -f Job_Dockerfile --build-arg JOB_PATH=src/sbl_validation_processor/sqs_csv_to_parquet .
docker build --platform linux/amd64 -t sqs-validator-job:latest -f Job_Dockerfile --build-arg JOB_PATH=src/sbl_validation_processor/sqs_parquet_validation .
docker build --platform linux/amd64 -t sqs-aggregator-job:latest -f Job_Dockerfile --build-arg JOB_PATH=src/sbl_validation_processor/sqs_validation_aggregator .
docker tag sqs-parquet:latest 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-parquet:latest.2
docker tag sqs-parquet-job:latest 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-parquet-job:latest.2
docker tag sqs-validate:latest 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-validate:latest.2
docker tag sqs-validator-job:latest 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-validator-job:latest.2
docker tag sqs-aggregator:latest 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-aggregator:latest.2
docker tag sqs-aggregator-job:latest 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-aggregator-job:latest.2
docker push 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-parquet:latest.2
docker push 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-parquet-job:latest.2
docker push 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-validate:latest.2
docker push 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-validator-job:latest.2
docker push 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-aggregator:latest.2
docker push 099248080076.dkr.ecr.us-east-1.amazonaws.com/cfpb/regtech/sqs-aggregator-job:latest.2
kubectl rollout restart deployment -n regtech sqs-csv-poller
kubectl rollout restart deployment -n regtech sqs-pqs-poller
kubectl rollout restart deployment -n regtech sqs-res-poller
fi