Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cloudlift/deployment/deployer.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import sys
from time import sleep

from cloudlift.exceptions import UnrecoverableException
from colorclass import Color
from terminaltables import SingleTable

from cloudlift.config import ParameterStore
from cloudlift.deployment.ecs import DeployAction
from cloudlift.config.logging import log_bold, log_err, log_intent, log_with_color
from cloudlift.deployment.ecs import DeployAction, EcsClient
from cloudlift.exceptions import UnrecoverableException


def deploy_new_version(client, cluster_name, ecs_service_name,
def deploy_new_version(region, cluster_name, ecs_service_name,
deploy_version_tag, service_name, sample_env_file_path,
env_name, color='white', complete_image_uri=None):
env_config = build_config(env_name, service_name, sample_env_file_path)
client = EcsClient(None, None, region)
deployment = DeployAction(client, cluster_name, ecs_service_name)
if deployment.service.desired_count == 0:
desired_count = 1
Expand Down
4 changes: 1 addition & 3 deletions cloudlift/deployment/service_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
get_region_for_environment)
from cloudlift.config import get_cluster_name, get_service_stack_name
from cloudlift.deployment import deployer
from cloudlift.deployment.ecs import EcsClient
from cloudlift.config.logging import log_bold, log_err, log_intent, log_warning

DEPLOYMENT_COLORS = ['blue', 'magenta', 'white', 'cyan']
Expand Down Expand Up @@ -45,7 +44,6 @@ def run(self):
log_bold("Checking image in ECR")
self.upload_artefacts()
log_bold("Initiating deployment\n")
ecs_client = EcsClient(None, None, self.region)

jobs = []
for index, service_name in enumerate(self.ecs_service_names):
Expand All @@ -56,7 +54,7 @@ def run(self):
process = multiprocessing.Process(
target=deployer.deploy_new_version,
args=(
ecs_client,
self.region,
self.cluster_name,
service_name,
self.version,
Expand Down
2 changes: 1 addition & 1 deletion cloudlift/version/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '1.4.3'
VERSION = '1.4.4'