Skip to content

Commit

Permalink
Adding AWS ECS/ECR/CodeBuild services support to deploy via Foursight.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Oct 13, 2023
1 parent 3f8e694 commit 5da5de8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions foursight_core/react/api/aws_ecs_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def get_build_digest(log_group: str, log_stream: str) -> Optional[str]:
def reorganize_response(services: dict) -> dict:
if not services:
return {}
import pdb ; pdb.set_trace()
response = {
"services": [],
"image": services[0]["image"],
Expand All @@ -34,16 +33,15 @@ def reorganize_response(services: dict) -> dict:
sanity_check = args.get("sanity_check", "").lower() == "true" if args else False
services = get_aws_ecs_services_for_update_raw(cluster_arn)
builds_and_images_identical = True
sanity_checked = True
previous_service = None
for service in services:
service["env"] = envs.get_associated_env(service["task_definition_arn"])
if sanity_check:
log_group = service["build"].get("log_group")
log_stream = service["build"].get("log_stream")
service["build"]["digest"] = get_build_digest(log_group, log_stream)
if service["build"].get("digest") != service["image"].get("digest"):
sanity_checked = False
service["image"]["sanity_checked_with_build"] = (
service["build"].get("digest") == service["image"].get("digest"))
if previous_service:
if previous_service["build"] != service["build"] or previous_service["image"] != service["image"]:
builds_and_images_identical = False
Expand Down

0 comments on commit 5da5de8

Please sign in to comment.