Fix merge

This commit is contained in:
STAM 2024-06-24 16:26:46 +03:00
commit 6e7108bb4d
No known key found for this signature in database
GPG Key ID: 711526C6938897F1
1683 changed files with 40195 additions and 37098 deletions

View File

@ -406,6 +406,7 @@ ecosystem-debian-bullseye-images:
cd `pwd`/linux/ecosystem/epicmorg/debian/11-bullseye/jdk7 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/11-bullseye/jdk8 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/11-bullseye/jdk11 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/11-bullseye/jdk16 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/11-bullseye/jdk17 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/11-bullseye/jdk18 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/11-bullseye/jdk19 && pwd && make build && make deploy
@ -420,7 +421,10 @@ ecosystem-debian-bookworm-images:
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk7 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk8 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk11 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk16 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk17 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk18 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk19 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk20 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/epicmorg/debian/12-bookworm/jdk21 && pwd && make build && make deploy

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -10,7 +10,7 @@ import logging
import sys
# Script version
SCRIPT_VERSION = "1.0.0.1"
SCRIPT_VERSION = "1.0.1.0"
# ASCII art for EpicMorg
ASCII_ART = r"""
@ -107,6 +107,7 @@ def build_with_kaniko(service_name, build_context, dockerfile, image_name, build
for line in process.stderr:
logging.error(line.strip())
logging.error(f"Error building {service_name}")
raise Exception(f"Failed to build {service_name}")
def show_help():
print(ASCII_ART)
@ -166,29 +167,30 @@ def main():
logging.error(f"Error: Image name {image_name} is used {count} times.")
return
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
try:
with ThreadPoolExecutor() as executor:
futures = []
for service_name, service_data in services.items():
build_data = service_data.get('build', {})
build_context = build_data.get('context', '.')
dockerfile = build_data.get('dockerfile', 'Dockerfile')
image_name = service_data.get('image')
build_args = build_data.get('args', {})
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
# Substitute environment variables with their values if they exist
build_args = {key: os.getenv(key, value) for key, value in build_args.items()}
if not image_name:
logging.warning(f"No image specified for service {service_name}")
continue
futures.append(executor.submit(build_with_kaniko, service_name, build_context, dockerfile, image_name, build_args, kaniko_image, deploy, dry))
for future in as_completed(futures):
try:
for future in as_completed(futures):
future.result()
except Exception as exc:
logging.error(f"Generated an exception: {exc}")
except Exception as exc:
logging.error(f"Build failed: {exc}")
sys.exit(1)
if __name__ == '__main__':
main()

Some files were not shown because too many files have changed in this diff Show More