Skip to content

Commit 375dfd2

Browse files
Add VERSION_LABEL as environment variable
1 parent 8d606dd commit 375dfd2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/deploy_release.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
from time import strftime, sleep
22
from botocore.exceptions import ClientError
3-
3+
import os
44

55
def main(BUCKET_KEY, S3_ARTIFACTS_BUCKET, BLUE_ENV_NAME, BEANSTALK_APP_NAME, boto_authenticated_client):
66
VERSION_LABEL = strftime("%Y%m%d%H%M%S")
7+
8+
if "VERSION_LABEL" in os.environ:
9+
VERSION_LABEL = os.environ['VERSION_LABEL']
10+
711
try:
812
beanstalkclient = boto_authenticated_client.client('elasticbeanstalk')
913
except ClientError as err:
@@ -74,7 +78,7 @@ def wait_until_env_be_ready(beanstalkclient, ENV_NAME):
7478
env_info = get_env_info(beanstalkclient, ENV_NAME)
7579
while env_info["Environments"][0]["Status"] != "Ready":
7680
print("Waiting the blue environment be Ready!")
77-
sleep(5)
81+
sleep(50)
7882
env_info = get_env_info(beanstalkclient, ENV_NAME)
7983
return "Env is ready"
8084

0 commit comments

Comments
 (0)