Skip to content

Commit

Permalink
Merge pull request #77 from veezor/maestro-debug
Browse files Browse the repository at this point in the history
Fix Create cluster on first time
  • Loading branch information
fagianijunior authored Oct 31, 2023
2 parents bf46094 + a2f857e commit 6e5112e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ main_processes=${main_processes%$'\n'}
# refactor line break below
main_processes="$main_processes
launcher"
main_services=$(aws ecs list-services --cluster $ECS_CLUSTER_ID)
while IFS= read -r line; do
main_create_service=$(jq ".serviceArns[] | select(endswith(\"$REPO_SLUG-$BRANCH-$line\"))" <<<$main_services)
release.sh --image-name $IMAGE_NAME \
--process-type $line \
--repository-slug $REPO_SLUG \
Expand All @@ -99,6 +97,12 @@ while IFS= read -r line; do
--branch-name $BRANCH \
--cluster-id $ECS_CLUSTER_ID

if [ -z "$main_services" ]; then
main_services=$(aws ecs list-services --cluster $ECS_CLUSTER_ID)
fi

main_create_service=$(jq ".serviceArns[] | select(endswith(\"$REPO_SLUG-$BRANCH-$line\"))" <<<$main_services)

deploy.sh --process-type $line \
--service-name $REPO_SLUG-$BRANCH-$line \
--cluster-id $ECS_CLUSTER_ID \
Expand Down

0 comments on commit 6e5112e

Please sign in to comment.