Skip to content

Commit

Permalink
Add VERSION_LABEL as environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
caiovfernandes committed Jul 5, 2023
1 parent 8d606dd commit 375dfd2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/deploy_release.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
from time import strftime, sleep
from botocore.exceptions import ClientError

import os

def main(BUCKET_KEY, S3_ARTIFACTS_BUCKET, BLUE_ENV_NAME, BEANSTALK_APP_NAME, boto_authenticated_client):
VERSION_LABEL = strftime("%Y%m%d%H%M%S")

if "VERSION_LABEL" in os.environ:
VERSION_LABEL = os.environ['VERSION_LABEL']

try:
beanstalkclient = boto_authenticated_client.client('elasticbeanstalk')
except ClientError as err:
Expand Down Expand Up @@ -74,7 +78,7 @@ def wait_until_env_be_ready(beanstalkclient, ENV_NAME):
env_info = get_env_info(beanstalkclient, ENV_NAME)
while env_info["Environments"][0]["Status"] != "Ready":
print("Waiting the blue environment be Ready!")
sleep(5)
sleep(50)
env_info = get_env_info(beanstalkclient, ENV_NAME)
return "Env is ready"

Expand Down

0 comments on commit 375dfd2

Please sign in to comment.