зеркало из https://github.com/Azure/iotedgedev.git
Adding DOTNET_EXE_DIR to .env
This commit is contained in:
Родитель
4e524fd2d6
Коммит
f2e43bc05f
4
.env.tmp
4
.env.tmp
|
@ -58,6 +58,10 @@ CONTAINER_TAG=""
|
|||
DOTNET_VERBOSITY="q"
|
||||
# q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]
|
||||
|
||||
|
||||
DOTNET_EXE_DIR="./bin/Debug/netcoreapp2.0/publish"
|
||||
# The default EXE_DIR directory to pass to the Docker build command.
|
||||
|
||||
#
|
||||
# SOLUTION SETTINGS
|
||||
#
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
FROM jongallant/iotedgedev-deps:${VERSION}-linux
|
||||
RUN pip install -U azure-iot-edge-dev-tool
|
||||
RUN pip --no-cache-dir install -U azure-iot-edge-dev-tool
|
|
@ -1,2 +1,2 @@
|
|||
FROM jongallant/iotedgedev-deps:0.62.0-linux
|
||||
RUN pip install -U azure-iot-edge-dev-tool
|
||||
RUN pip --no-cache-dir install -U azure-iot-edge-dev-tool
|
|
@ -7,6 +7,7 @@ class DotNetModuleProcessor(object):
|
|||
self.utility = utility
|
||||
self.output = output
|
||||
self.module_dir = module_dir
|
||||
self.exe_dir = self.envvars.DOTNET_EXE_DIR
|
||||
|
||||
def build(self):
|
||||
project_file = self.get_project_file()
|
||||
|
|
|
@ -116,6 +116,7 @@ class EnvVars:
|
|||
self.IOT_REST_API_VERSION = self.get_envvar(
|
||||
"IOT_REST_API_VERSION")
|
||||
self.DOTNET_VERBOSITY = self.get_envvar("DOTNET_VERBOSITY")
|
||||
self.DOTNET_EXE_DIR = self.get_envvar("DOTNET_EXE_DIR", False)
|
||||
self.LOGS_CMD = self.get_envvar("LOGS_CMD")
|
||||
if "DOCKER_HOST" in os.environ:
|
||||
self.DOCKER_HOST = self.get_envvar("DOCKER_HOST", False)
|
||||
|
@ -139,10 +140,14 @@ class EnvVars:
|
|||
raise e
|
||||
|
||||
def get_envvar(self, key, required=True):
|
||||
val = os.environ[key].strip()
|
||||
if not val and required:
|
||||
val = ""
|
||||
|
||||
if key in os.environ:
|
||||
val = os.environ[key].strip()
|
||||
|
||||
if required and not val:
|
||||
self.output.error(
|
||||
"Environment Variable {0} not set. Either add to .env file or to your system's Environment Variables".format(key))
|
||||
"Environment Variable {0} not set. Either add to .env file or to your system's Environment Variables".format(key))
|
||||
sys.exit(-1)
|
||||
|
||||
return val
|
||||
|
|
|
@ -77,7 +77,7 @@ class Modules:
|
|||
|
||||
# BUILD DOCKER IMAGE
|
||||
build_result = self.dock.docker_client.images.build(
|
||||
tag=image_destination_name, path=".", dockerfile=docker_file_name)
|
||||
tag=image_destination_name, path=".", dockerfile=docker_file_name, buildargs={"EXE_DIR": mod_proc.exe_dir})
|
||||
self.output.info(
|
||||
"DOCKER IMAGE DETAILS: {0}".format(build_result))
|
||||
|
||||
|
@ -90,7 +90,8 @@ class Modules:
|
|||
|
||||
for line in self.dock.docker_client.images.push(repository=image_destination_name, stream=True, auth_config={
|
||||
"username": self.envvars.CONTAINER_REGISTRY_USERNAME, "password": self.envvars.CONTAINER_REGISTRY_PASSWORD}):
|
||||
self.output.procout(self.utility.decode(line).replace("\\u003e",">"))
|
||||
self.output.procout(self.utility.decode(
|
||||
line).replace("\\u003e", ">"))
|
||||
|
||||
self.output.footer("BUILD COMPLETE")
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ class ModulesProcessorFactory(object):
|
|||
self.utility = utility
|
||||
self.output = output
|
||||
self.module_dir = module_dir
|
||||
self.exe_dir = "."
|
||||
|
||||
def get(self, module_language):
|
||||
module_language = module_language.lower()
|
||||
|
|
|
@ -58,6 +58,9 @@ CONTAINER_TAG=""
|
|||
DOTNET_VERBOSITY="q"
|
||||
# q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]
|
||||
|
||||
DOTNET_EXE_DIR="./bin/Debug/netcoreapp2.0/publish"
|
||||
# The default EXE_DIR directory to pass to the Docker build command.
|
||||
|
||||
#
|
||||
# SOLUTION SETTINGS
|
||||
#
|
||||
|
|
Двоичные данные
iotedgedev/template/template.zip
Двоичные данные
iotedgedev/template/template.zip
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче