Skip to content

Commit

Permalink
Use GA images when setup_registry (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
LazarusX authored and jongio committed Aug 16, 2018
1 parent a61e91a commit 799faec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion iotedgedev/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

PY35 = sys.version_info >= (3, 5)
PY3 = sys.version_info >= (3, 0)
PY2 = sys.version_info < (3, 0)
PY2 = sys.version_info < (3, 0)
2 changes: 0 additions & 2 deletions iotedgedev/containerregistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ def __init__(self, server, username, password):
self.server = server
self.username = username
self.password = password


6 changes: 3 additions & 3 deletions iotedgedev/dockercls.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ def setup_registry(self):

def setup_registry_in_config(self, image_names):
self.output.info(
"Replacing 'microsoft/' with '{CONTAINER_REGISTRY_SERVER}/' in config files.")
"Replacing 'mcr.microsoft.com/' with '{CONTAINER_REGISTRY_SERVER}/' in config files.")

# Replace microsoft/ with ${CONTAINER_REGISTRY_SERVER}
# Replace mcr.microsoft.com/ with ${CONTAINER_REGISTRY_SERVER}
for config_file in self.utility.get_config_files():
config_file_contents = self.utility.get_file_contents(config_file)
for image_name in image_names:
config_file_contents = config_file_contents.replace(
"microsoft/" + image_name, "${CONTAINER_REGISTRY_SERVER}/" + image_name)
"mcr.microsoft.com/" + image_name, "${CONTAINER_REGISTRY_SERVER}/" + image_name)

with open(config_file, "w") as config_file_build:
config_file_build.write(config_file_contents)
Expand Down
3 changes: 1 addition & 2 deletions iotedgedev/envvars.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import os
import platform
import socket
import sys
from shutil import copyfile
from .compat import PY2

from dotenv import load_dotenv, set_key
from fstrings import f

from .args import Args
from .compat import PY2
from .connectionstring import DeviceConnectionString, IoTHubConnectionString
from .containerregistry import ContainerRegistry

Expand Down

0 comments on commit 799faec

Please sign in to comment.