Skip to content

Commit

Permalink
⚡ traverse one more level to create more jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepstaylor committed Jul 31, 2024
1 parent f4d16d4 commit c33a5de
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/data-refresh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,18 @@ jobs:
SRC_BUCKET=$(kubectl get secrets s3-bucket-output -o jsonpath='{.data.BUCKET_NAME}' | base64 -d)
DIRS=$(kubectl exec $SERVICE_POD_NAME -- aws s3 ls $SRC_BUCKET | grep -v contentstore | awk -F ' ' '{print $2}' | tr -d '/' | tr '\n' ',')
TL_DIRS=$(kubectl exec $SERVICE_POD_NAME -- aws s3 ls $SRC_BUCKET | grep -v contentstore | awk -F ' ' '{print $2}' | tr -d '/' | tr '\n' ',')
DIRS=""
for TL_DIR in $(echo $TL_DIRS | tr ',' ' '); do
DIRS=$(kubectl exec $SERVICE_POD_NAME -- aws s3 ls $SRC_BUCKET/$TL_DIR | grep -v contentstore | awk -F ' ' '{print $2}' | tr -d '/' | tr '\n' ',')
done
DIRS=""
for prefix in $(aws s3api list-objects-v2 --bucket $SRC_BUCKET --delimiter '/' --query 'CommonPrefixes[*].Prefix' --output text); do
DIR=$(aws s3api list-objects-v2 --bucket $SRC_BUCKET --prefix "$prefix" --delimiter '/' --query 'CommonPrefixes[*].Prefix' --output text)
DIRS+="${DIR},"
done
DIRS=$(echo $DIRS | tr -d '/' | tr '\n' ',')
helm install refresh-s3 . \
--set sourceEnvironment=${{ github.event.inputs.source_env }} \
Expand Down

0 comments on commit c33a5de

Please sign in to comment.