@@ -37,7 +37,8 @@ def log(msg):
3737
3838
3939def get_registry_name ():
40- hostname = os .getenv ('DEIS_REGISTRY_HOSTNAME' , "" ).replace ("https://" , "" ).replace ("http://" , "" )
40+ hostname = os .getenv ('DEIS_REGISTRY_HOSTNAME' , "" )
41+ hostname = hostname .replace ("https://" , "" ).replace ("http://" , "" )
4142 if regsitryLocation == "off-cluster" :
4243 organization = os .getenv ('DEIS_REGISTRY_ORGANIZATION' )
4344 regName = ""
@@ -52,9 +53,9 @@ def get_registry_name():
5253 elif regsitryLocation == "ecr" :
5354 return hostname
5455 elif regsitryLocation == "gcr" :
55- return hostname + "/" + os .getenv ('DEIS_REGISTRY_GCS_PROJ_ID' )
56+ return hostname + "/" + os .getenv ('DEIS_REGISTRY_GCS_PROJ_ID' )
5657 else :
57- return os .getenv ("DEIS_REGISTRY_SERVICE_HOST" ) + ":" + os .getenv ("DEIS_REGISTRY_SERVICE_PORT" )
58+ return os .getenv ("DEIS_REGISTRY_SERVICE_HOST" ) + ":" + os .getenv ("DEIS_REGISTRY_SERVICE_PORT" ) # noqa: E501
5859
5960
6061def docker_push (client , repo , tag ):
@@ -80,7 +81,13 @@ def download_file(tar_path):
8081 os .putenv ('BUCKET_FILE' , "/tmp/objectstore/minio/builder-bucket" )
8182 elif os .getenv ('BUILDER_STORAGE' ) in ["azure" , "swift" ]:
8283 os .putenv ('CONTAINER_FILE' , "/var/run/secrets/deis/objectstore/creds/builder-container" )
83- command = ["objstorage" , "--storage-type=" + os .getenv ('BUILDER_STORAGE' ), "download" , tar_path , "apptar" ]
84+ command = [
85+ "objstorage" ,
86+ "--storage-type=" + os .getenv ('BUILDER_STORAGE' ),
87+ "download" ,
88+ tar_path ,
89+ "apptar"
90+ ]
8491 subprocess .check_call (command )
8592
8693tar_path = os .getenv ('TAR_PATH' )
0 commit comments