diff --git a/bin/kaniko/kaniko-build.py b/bin/kaniko/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/bin/kaniko/kaniko-build.py +++ b/bin/kaniko/kaniko-build.py @@ -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() diff --git a/linux/advanced/mattermost/kaniko-build.py b/linux/advanced/mattermost/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/mattermost/kaniko-build.py +++ b/linux/advanced/mattermost/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/14/kaniko-build.py b/linux/advanced/nextcloud/patched/14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/14/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/14/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/15/kaniko-build.py b/linux/advanced/nextcloud/patched/15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/15/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/15/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/16/kaniko-build.py b/linux/advanced/nextcloud/patched/16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/16/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/16/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/17/kaniko-build.py b/linux/advanced/nextcloud/patched/17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/17/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/17/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/18/kaniko-build.py b/linux/advanced/nextcloud/patched/18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/18/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/18/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/19/kaniko-build.py b/linux/advanced/nextcloud/patched/19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/19/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/19/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/20/kaniko-build.py b/linux/advanced/nextcloud/patched/20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/20/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/20/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/21/kaniko-build.py b/linux/advanced/nextcloud/patched/21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/21/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/21/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/22/kaniko-build.py b/linux/advanced/nextcloud/patched/22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/22/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/22/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/23/kaniko-build.py b/linux/advanced/nextcloud/patched/23/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/23/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/23/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/24/kaniko-build.py b/linux/advanced/nextcloud/patched/24/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/24/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/24/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/25/kaniko-build.py b/linux/advanced/nextcloud/patched/25/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/25/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/25/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/26/kaniko-build.py b/linux/advanced/nextcloud/patched/26/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/26/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/26/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/27/kaniko-build.py b/linux/advanced/nextcloud/patched/27/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/27/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/27/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/28/kaniko-build.py b/linux/advanced/nextcloud/patched/28/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/28/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/28/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/29/kaniko-build.py b/linux/advanced/nextcloud/patched/29/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/29/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/29/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/patched/latest/kaniko-build.py b/linux/advanced/nextcloud/patched/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/patched/latest/kaniko-build.py +++ b/linux/advanced/nextcloud/patched/latest/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/14/kaniko-build.py b/linux/advanced/nextcloud/pure/14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/14/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/14/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/15/kaniko-build.py b/linux/advanced/nextcloud/pure/15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/15/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/15/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/16/kaniko-build.py b/linux/advanced/nextcloud/pure/16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/16/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/16/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/17/kaniko-build.py b/linux/advanced/nextcloud/pure/17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/17/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/17/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/18/kaniko-build.py b/linux/advanced/nextcloud/pure/18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/18/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/18/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/19/kaniko-build.py b/linux/advanced/nextcloud/pure/19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/19/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/19/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/20/kaniko-build.py b/linux/advanced/nextcloud/pure/20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/20/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/20/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/21/kaniko-build.py b/linux/advanced/nextcloud/pure/21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/21/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/21/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/22/kaniko-build.py b/linux/advanced/nextcloud/pure/22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/22/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/22/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/23/kaniko-build.py b/linux/advanced/nextcloud/pure/23/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/23/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/23/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/24/kaniko-build.py b/linux/advanced/nextcloud/pure/24/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/24/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/24/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/25/kaniko-build.py b/linux/advanced/nextcloud/pure/25/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/25/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/25/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/26/kaniko-build.py b/linux/advanced/nextcloud/pure/26/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/26/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/26/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/27/kaniko-build.py b/linux/advanced/nextcloud/pure/27/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/27/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/27/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/28/kaniko-build.py b/linux/advanced/nextcloud/pure/28/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/28/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/28/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/29/kaniko-build.py b/linux/advanced/nextcloud/pure/29/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/29/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/29/kaniko-build.py @@ -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() diff --git a/linux/advanced/nextcloud/pure/latest/kaniko-build.py b/linux/advanced/nextcloud/pure/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/nextcloud/pure/latest/kaniko-build.py +++ b/linux/advanced/nextcloud/pure/latest/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/develop/2.7/kaniko-build.py b/linux/advanced/python/develop/2.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/develop/2.7/kaniko-build.py +++ b/linux/advanced/python/develop/2.7/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/develop/3.10/kaniko-build.py b/linux/advanced/python/develop/3.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/develop/3.10/kaniko-build.py +++ b/linux/advanced/python/develop/3.10/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/develop/3.11/kaniko-build.py b/linux/advanced/python/develop/3.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/develop/3.11/kaniko-build.py +++ b/linux/advanced/python/develop/3.11/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/develop/3.12/kaniko-build.py b/linux/advanced/python/develop/3.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/develop/3.12/kaniko-build.py +++ b/linux/advanced/python/develop/3.12/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/develop/3.13/kaniko-build.py b/linux/advanced/python/develop/3.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/develop/3.13/kaniko-build.py +++ b/linux/advanced/python/develop/3.13/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/develop/3.6/kaniko-build.py b/linux/advanced/python/develop/3.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/develop/3.6/kaniko-build.py +++ b/linux/advanced/python/develop/3.6/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/develop/3.7/kaniko-build.py b/linux/advanced/python/develop/3.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/develop/3.7/kaniko-build.py +++ b/linux/advanced/python/develop/3.7/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/develop/3.8/kaniko-build.py b/linux/advanced/python/develop/3.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/develop/3.8/kaniko-build.py +++ b/linux/advanced/python/develop/3.8/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/develop/3.9/kaniko-build.py b/linux/advanced/python/develop/3.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/develop/3.9/kaniko-build.py +++ b/linux/advanced/python/develop/3.9/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/main/2.7/kaniko-build.py b/linux/advanced/python/main/2.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/main/2.7/kaniko-build.py +++ b/linux/advanced/python/main/2.7/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/main/3.10/kaniko-build.py b/linux/advanced/python/main/3.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/main/3.10/kaniko-build.py +++ b/linux/advanced/python/main/3.10/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/main/3.11/kaniko-build.py b/linux/advanced/python/main/3.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/main/3.11/kaniko-build.py +++ b/linux/advanced/python/main/3.11/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/main/3.12/kaniko-build.py b/linux/advanced/python/main/3.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/main/3.12/kaniko-build.py +++ b/linux/advanced/python/main/3.12/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/main/3.13/kaniko-build.py b/linux/advanced/python/main/3.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/main/3.13/kaniko-build.py +++ b/linux/advanced/python/main/3.13/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/main/3.6/kaniko-build.py b/linux/advanced/python/main/3.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/main/3.6/kaniko-build.py +++ b/linux/advanced/python/main/3.6/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/main/3.7/kaniko-build.py b/linux/advanced/python/main/3.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/main/3.7/kaniko-build.py +++ b/linux/advanced/python/main/3.7/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/main/3.8/kaniko-build.py b/linux/advanced/python/main/3.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/main/3.8/kaniko-build.py +++ b/linux/advanced/python/main/3.8/kaniko-build.py @@ -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() diff --git a/linux/advanced/python/main/3.9/kaniko-build.py b/linux/advanced/python/main/3.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/python/main/3.9/kaniko-build.py +++ b/linux/advanced/python/main/3.9/kaniko-build.py @@ -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() diff --git a/linux/advanced/sentry/latest/kaniko-build.py b/linux/advanced/sentry/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/sentry/latest/kaniko-build.py +++ b/linux/advanced/sentry/latest/kaniko-build.py @@ -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() diff --git a/linux/advanced/teamcity/server/kaniko-build.py b/linux/advanced/teamcity/server/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/teamcity/server/kaniko-build.py +++ b/linux/advanced/teamcity/server/kaniko-build.py @@ -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() diff --git a/linux/advanced/vscode-server/amxx/1.10/kaniko-build.py b/linux/advanced/vscode-server/amxx/1.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/vscode-server/amxx/1.10/kaniko-build.py +++ b/linux/advanced/vscode-server/amxx/1.10/kaniko-build.py @@ -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() diff --git a/linux/advanced/vscode-server/amxx/1.9/kaniko-build.py b/linux/advanced/vscode-server/amxx/1.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/vscode-server/amxx/1.9/kaniko-build.py +++ b/linux/advanced/vscode-server/amxx/1.9/kaniko-build.py @@ -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() diff --git a/linux/advanced/vscode-server/android/kaniko-build.py b/linux/advanced/vscode-server/android/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/vscode-server/android/kaniko-build.py +++ b/linux/advanced/vscode-server/android/kaniko-build.py @@ -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() diff --git a/linux/advanced/vscode-server/cpp/kaniko-build.py b/linux/advanced/vscode-server/cpp/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/vscode-server/cpp/kaniko-build.py +++ b/linux/advanced/vscode-server/cpp/kaniko-build.py @@ -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() diff --git a/linux/advanced/vscode-server/devops/kaniko-build.py b/linux/advanced/vscode-server/devops/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/vscode-server/devops/kaniko-build.py +++ b/linux/advanced/vscode-server/devops/kaniko-build.py @@ -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() diff --git a/linux/advanced/vscode-server/docker/kaniko-build.py b/linux/advanced/vscode-server/docker/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/vscode-server/docker/kaniko-build.py +++ b/linux/advanced/vscode-server/docker/kaniko-build.py @@ -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() diff --git a/linux/advanced/vscode-server/dotnet-full/kaniko-build.py b/linux/advanced/vscode-server/dotnet-full/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/vscode-server/dotnet-full/kaniko-build.py +++ b/linux/advanced/vscode-server/dotnet-full/kaniko-build.py @@ -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() diff --git a/linux/advanced/vscode-server/dotnet/kaniko-build.py b/linux/advanced/vscode-server/dotnet/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/vscode-server/dotnet/kaniko-build.py +++ b/linux/advanced/vscode-server/dotnet/kaniko-build.py @@ -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() diff --git a/linux/advanced/vscode-server/latest/kaniko-build.py b/linux/advanced/vscode-server/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/vscode-server/latest/kaniko-build.py +++ b/linux/advanced/vscode-server/latest/kaniko-build.py @@ -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() diff --git a/linux/advanced/vscode-server/mono/kaniko-build.py b/linux/advanced/vscode-server/mono/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/vscode-server/mono/kaniko-build.py +++ b/linux/advanced/vscode-server/mono/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/3.0/agent/kaniko-build.py b/linux/advanced/zabbix/3.0/agent/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/3.0/agent/kaniko-build.py +++ b/linux/advanced/zabbix/3.0/agent/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/3.0/java-gateway/kaniko-build.py b/linux/advanced/zabbix/3.0/java-gateway/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/3.0/java-gateway/kaniko-build.py +++ b/linux/advanced/zabbix/3.0/java-gateway/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/3.0/proxy-mysql/kaniko-build.py b/linux/advanced/zabbix/3.0/proxy-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/3.0/proxy-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/3.0/proxy-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/3.0/proxy-sqlite3/kaniko-build.py b/linux/advanced/zabbix/3.0/proxy-sqlite3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/3.0/proxy-sqlite3/kaniko-build.py +++ b/linux/advanced/zabbix/3.0/proxy-sqlite3/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/3.0/server-mysql/kaniko-build.py b/linux/advanced/zabbix/3.0/server-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/3.0/server-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/3.0/server-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/3.0/server-pgsql/kaniko-build.py b/linux/advanced/zabbix/3.0/server-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/3.0/server-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/3.0/server-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/3.0/snmptraps/kaniko-build.py b/linux/advanced/zabbix/3.0/snmptraps/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/3.0/snmptraps/kaniko-build.py +++ b/linux/advanced/zabbix/3.0/snmptraps/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/3.0/web-mysql/kaniko-build.py b/linux/advanced/zabbix/3.0/web-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/3.0/web-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/3.0/web-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/3.0/web-pgsql/kaniko-build.py b/linux/advanced/zabbix/3.0/web-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/3.0/web-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/3.0/web-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/4.0/agent/kaniko-build.py b/linux/advanced/zabbix/4.0/agent/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/4.0/agent/kaniko-build.py +++ b/linux/advanced/zabbix/4.0/agent/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/4.0/java-gateway/kaniko-build.py b/linux/advanced/zabbix/4.0/java-gateway/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/4.0/java-gateway/kaniko-build.py +++ b/linux/advanced/zabbix/4.0/java-gateway/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/4.0/proxy-mysql/kaniko-build.py b/linux/advanced/zabbix/4.0/proxy-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/4.0/proxy-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/4.0/proxy-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/4.0/proxy-sqlite3/kaniko-build.py b/linux/advanced/zabbix/4.0/proxy-sqlite3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/4.0/proxy-sqlite3/kaniko-build.py +++ b/linux/advanced/zabbix/4.0/proxy-sqlite3/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/4.0/server-mysql/kaniko-build.py b/linux/advanced/zabbix/4.0/server-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/4.0/server-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/4.0/server-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/4.0/server-pgsql/kaniko-build.py b/linux/advanced/zabbix/4.0/server-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/4.0/server-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/4.0/server-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/4.0/snmptraps/kaniko-build.py b/linux/advanced/zabbix/4.0/snmptraps/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/4.0/snmptraps/kaniko-build.py +++ b/linux/advanced/zabbix/4.0/snmptraps/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/4.0/web-mysql/kaniko-build.py b/linux/advanced/zabbix/4.0/web-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/4.0/web-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/4.0/web-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/4.0/web-pgsql/kaniko-build.py b/linux/advanced/zabbix/4.0/web-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/4.0/web-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/4.0/web-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.0/agent/kaniko-build.py b/linux/advanced/zabbix/5.0/agent/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.0/agent/kaniko-build.py +++ b/linux/advanced/zabbix/5.0/agent/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.0/agent2/kaniko-build.py b/linux/advanced/zabbix/5.0/agent2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.0/agent2/kaniko-build.py +++ b/linux/advanced/zabbix/5.0/agent2/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.0/java-gateway/kaniko-build.py b/linux/advanced/zabbix/5.0/java-gateway/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.0/java-gateway/kaniko-build.py +++ b/linux/advanced/zabbix/5.0/java-gateway/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.0/proxy-mysql/kaniko-build.py b/linux/advanced/zabbix/5.0/proxy-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.0/proxy-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/5.0/proxy-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.0/proxy-sqlite3/kaniko-build.py b/linux/advanced/zabbix/5.0/proxy-sqlite3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.0/proxy-sqlite3/kaniko-build.py +++ b/linux/advanced/zabbix/5.0/proxy-sqlite3/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.0/server-mysql/kaniko-build.py b/linux/advanced/zabbix/5.0/server-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.0/server-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/5.0/server-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.0/server-pgsql/kaniko-build.py b/linux/advanced/zabbix/5.0/server-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.0/server-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/5.0/server-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.0/snmptraps/kaniko-build.py b/linux/advanced/zabbix/5.0/snmptraps/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.0/snmptraps/kaniko-build.py +++ b/linux/advanced/zabbix/5.0/snmptraps/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.0/web-mysql/kaniko-build.py b/linux/advanced/zabbix/5.0/web-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.0/web-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/5.0/web-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.0/web-pgsql/kaniko-build.py b/linux/advanced/zabbix/5.0/web-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.0/web-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/5.0/web-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.2/agent/kaniko-build.py b/linux/advanced/zabbix/5.2/agent/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.2/agent/kaniko-build.py +++ b/linux/advanced/zabbix/5.2/agent/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.2/agent2/kaniko-build.py b/linux/advanced/zabbix/5.2/agent2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.2/agent2/kaniko-build.py +++ b/linux/advanced/zabbix/5.2/agent2/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.2/java-gateway/kaniko-build.py b/linux/advanced/zabbix/5.2/java-gateway/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.2/java-gateway/kaniko-build.py +++ b/linux/advanced/zabbix/5.2/java-gateway/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.2/proxy-mysql/kaniko-build.py b/linux/advanced/zabbix/5.2/proxy-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.2/proxy-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/5.2/proxy-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.2/proxy-sqlite3/kaniko-build.py b/linux/advanced/zabbix/5.2/proxy-sqlite3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.2/proxy-sqlite3/kaniko-build.py +++ b/linux/advanced/zabbix/5.2/proxy-sqlite3/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.2/server-mysql/kaniko-build.py b/linux/advanced/zabbix/5.2/server-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.2/server-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/5.2/server-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.2/server-pgsql/kaniko-build.py b/linux/advanced/zabbix/5.2/server-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.2/server-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/5.2/server-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.2/snmptraps/kaniko-build.py b/linux/advanced/zabbix/5.2/snmptraps/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.2/snmptraps/kaniko-build.py +++ b/linux/advanced/zabbix/5.2/snmptraps/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.2/web-mysql/kaniko-build.py b/linux/advanced/zabbix/5.2/web-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.2/web-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/5.2/web-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.2/web-pgsql/kaniko-build.py b/linux/advanced/zabbix/5.2/web-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.2/web-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/5.2/web-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.4/agent/kaniko-build.py b/linux/advanced/zabbix/5.4/agent/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.4/agent/kaniko-build.py +++ b/linux/advanced/zabbix/5.4/agent/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.4/agent2/kaniko-build.py b/linux/advanced/zabbix/5.4/agent2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.4/agent2/kaniko-build.py +++ b/linux/advanced/zabbix/5.4/agent2/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.4/java-gateway/kaniko-build.py b/linux/advanced/zabbix/5.4/java-gateway/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.4/java-gateway/kaniko-build.py +++ b/linux/advanced/zabbix/5.4/java-gateway/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.4/proxy-mysql/kaniko-build.py b/linux/advanced/zabbix/5.4/proxy-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.4/proxy-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/5.4/proxy-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.4/proxy-sqlite3/kaniko-build.py b/linux/advanced/zabbix/5.4/proxy-sqlite3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.4/proxy-sqlite3/kaniko-build.py +++ b/linux/advanced/zabbix/5.4/proxy-sqlite3/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.4/server-mysql/kaniko-build.py b/linux/advanced/zabbix/5.4/server-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.4/server-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/5.4/server-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.4/server-pgsql/kaniko-build.py b/linux/advanced/zabbix/5.4/server-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.4/server-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/5.4/server-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.4/snmptraps/kaniko-build.py b/linux/advanced/zabbix/5.4/snmptraps/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.4/snmptraps/kaniko-build.py +++ b/linux/advanced/zabbix/5.4/snmptraps/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.4/web-mysql/kaniko-build.py b/linux/advanced/zabbix/5.4/web-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.4/web-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/5.4/web-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/5.4/web-pgsql/kaniko-build.py b/linux/advanced/zabbix/5.4/web-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/5.4/web-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/5.4/web-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.0/agent/kaniko-build.py b/linux/advanced/zabbix/6.0/agent/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.0/agent/kaniko-build.py +++ b/linux/advanced/zabbix/6.0/agent/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.0/agent2/kaniko-build.py b/linux/advanced/zabbix/6.0/agent2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.0/agent2/kaniko-build.py +++ b/linux/advanced/zabbix/6.0/agent2/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.0/java-gateway/kaniko-build.py b/linux/advanced/zabbix/6.0/java-gateway/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.0/java-gateway/kaniko-build.py +++ b/linux/advanced/zabbix/6.0/java-gateway/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.0/proxy-mysql/kaniko-build.py b/linux/advanced/zabbix/6.0/proxy-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.0/proxy-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/6.0/proxy-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.0/proxy-sqlite3/kaniko-build.py b/linux/advanced/zabbix/6.0/proxy-sqlite3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.0/proxy-sqlite3/kaniko-build.py +++ b/linux/advanced/zabbix/6.0/proxy-sqlite3/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.0/server-mysql/kaniko-build.py b/linux/advanced/zabbix/6.0/server-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.0/server-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/6.0/server-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.0/server-pgsql/kaniko-build.py b/linux/advanced/zabbix/6.0/server-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.0/server-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/6.0/server-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.0/snmptraps/kaniko-build.py b/linux/advanced/zabbix/6.0/snmptraps/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.0/snmptraps/kaniko-build.py +++ b/linux/advanced/zabbix/6.0/snmptraps/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.0/web-mysql/kaniko-build.py b/linux/advanced/zabbix/6.0/web-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.0/web-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/6.0/web-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.0/web-pgsql/kaniko-build.py b/linux/advanced/zabbix/6.0/web-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.0/web-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/6.0/web-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.2/agent/kaniko-build.py b/linux/advanced/zabbix/6.2/agent/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.2/agent/kaniko-build.py +++ b/linux/advanced/zabbix/6.2/agent/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.2/agent2/kaniko-build.py b/linux/advanced/zabbix/6.2/agent2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.2/agent2/kaniko-build.py +++ b/linux/advanced/zabbix/6.2/agent2/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.2/java-gateway/kaniko-build.py b/linux/advanced/zabbix/6.2/java-gateway/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.2/java-gateway/kaniko-build.py +++ b/linux/advanced/zabbix/6.2/java-gateway/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.2/proxy-mysql/kaniko-build.py b/linux/advanced/zabbix/6.2/proxy-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.2/proxy-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/6.2/proxy-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.2/proxy-sqlite3/kaniko-build.py b/linux/advanced/zabbix/6.2/proxy-sqlite3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.2/proxy-sqlite3/kaniko-build.py +++ b/linux/advanced/zabbix/6.2/proxy-sqlite3/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.2/server-mysql/kaniko-build.py b/linux/advanced/zabbix/6.2/server-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.2/server-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/6.2/server-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.2/server-pgsql/kaniko-build.py b/linux/advanced/zabbix/6.2/server-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.2/server-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/6.2/server-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.2/snmptraps/kaniko-build.py b/linux/advanced/zabbix/6.2/snmptraps/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.2/snmptraps/kaniko-build.py +++ b/linux/advanced/zabbix/6.2/snmptraps/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.2/web-mysql/kaniko-build.py b/linux/advanced/zabbix/6.2/web-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.2/web-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/6.2/web-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.2/web-pgsql/kaniko-build.py b/linux/advanced/zabbix/6.2/web-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.2/web-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/6.2/web-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.4/agent/kaniko-build.py b/linux/advanced/zabbix/6.4/agent/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.4/agent/kaniko-build.py +++ b/linux/advanced/zabbix/6.4/agent/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.4/agent2/kaniko-build.py b/linux/advanced/zabbix/6.4/agent2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.4/agent2/kaniko-build.py +++ b/linux/advanced/zabbix/6.4/agent2/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.4/java-gateway/kaniko-build.py b/linux/advanced/zabbix/6.4/java-gateway/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.4/java-gateway/kaniko-build.py +++ b/linux/advanced/zabbix/6.4/java-gateway/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.4/proxy-mysql/kaniko-build.py b/linux/advanced/zabbix/6.4/proxy-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.4/proxy-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/6.4/proxy-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.4/proxy-sqlite3/kaniko-build.py b/linux/advanced/zabbix/6.4/proxy-sqlite3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.4/proxy-sqlite3/kaniko-build.py +++ b/linux/advanced/zabbix/6.4/proxy-sqlite3/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.4/server-mysql/kaniko-build.py b/linux/advanced/zabbix/6.4/server-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.4/server-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/6.4/server-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.4/server-pgsql/kaniko-build.py b/linux/advanced/zabbix/6.4/server-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.4/server-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/6.4/server-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.4/snmptraps/kaniko-build.py b/linux/advanced/zabbix/6.4/snmptraps/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.4/snmptraps/kaniko-build.py +++ b/linux/advanced/zabbix/6.4/snmptraps/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.4/web-mysql/kaniko-build.py b/linux/advanced/zabbix/6.4/web-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.4/web-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/6.4/web-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/6.4/web-pgsql/kaniko-build.py b/linux/advanced/zabbix/6.4/web-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/6.4/web-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/6.4/web-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/latest/agent/kaniko-build.py b/linux/advanced/zabbix/latest/agent/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/latest/agent/kaniko-build.py +++ b/linux/advanced/zabbix/latest/agent/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/latest/agent2/kaniko-build.py b/linux/advanced/zabbix/latest/agent2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/latest/agent2/kaniko-build.py +++ b/linux/advanced/zabbix/latest/agent2/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/latest/java-gateway/kaniko-build.py b/linux/advanced/zabbix/latest/java-gateway/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/latest/java-gateway/kaniko-build.py +++ b/linux/advanced/zabbix/latest/java-gateway/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/latest/proxy-mysql/kaniko-build.py b/linux/advanced/zabbix/latest/proxy-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/latest/proxy-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/latest/proxy-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/latest/proxy-sqlite3/kaniko-build.py b/linux/advanced/zabbix/latest/proxy-sqlite3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/latest/proxy-sqlite3/kaniko-build.py +++ b/linux/advanced/zabbix/latest/proxy-sqlite3/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/latest/server-mysql/kaniko-build.py b/linux/advanced/zabbix/latest/server-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/latest/server-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/latest/server-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/latest/server-pgsql/kaniko-build.py b/linux/advanced/zabbix/latest/server-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/latest/server-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/latest/server-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/latest/snmptraps/kaniko-build.py b/linux/advanced/zabbix/latest/snmptraps/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/latest/snmptraps/kaniko-build.py +++ b/linux/advanced/zabbix/latest/snmptraps/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/latest/web-mysql/kaniko-build.py b/linux/advanced/zabbix/latest/web-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/latest/web-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/latest/web-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/latest/web-pgsql/kaniko-build.py b/linux/advanced/zabbix/latest/web-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/latest/web-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/latest/web-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/trunk/agent/kaniko-build.py b/linux/advanced/zabbix/trunk/agent/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/trunk/agent/kaniko-build.py +++ b/linux/advanced/zabbix/trunk/agent/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/trunk/agent2/kaniko-build.py b/linux/advanced/zabbix/trunk/agent2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/trunk/agent2/kaniko-build.py +++ b/linux/advanced/zabbix/trunk/agent2/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/trunk/java-gateway/kaniko-build.py b/linux/advanced/zabbix/trunk/java-gateway/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/trunk/java-gateway/kaniko-build.py +++ b/linux/advanced/zabbix/trunk/java-gateway/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/trunk/proxy-mysql/kaniko-build.py b/linux/advanced/zabbix/trunk/proxy-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/trunk/proxy-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/trunk/proxy-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/trunk/proxy-sqlite3/kaniko-build.py b/linux/advanced/zabbix/trunk/proxy-sqlite3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/trunk/proxy-sqlite3/kaniko-build.py +++ b/linux/advanced/zabbix/trunk/proxy-sqlite3/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/trunk/server-mysql/kaniko-build.py b/linux/advanced/zabbix/trunk/server-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/trunk/server-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/trunk/server-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/trunk/server-pgsql/kaniko-build.py b/linux/advanced/zabbix/trunk/server-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/trunk/server-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/trunk/server-pgsql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/trunk/snmptraps/kaniko-build.py b/linux/advanced/zabbix/trunk/snmptraps/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/trunk/snmptraps/kaniko-build.py +++ b/linux/advanced/zabbix/trunk/snmptraps/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/trunk/web-mysql/kaniko-build.py b/linux/advanced/zabbix/trunk/web-mysql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/trunk/web-mysql/kaniko-build.py +++ b/linux/advanced/zabbix/trunk/web-mysql/kaniko-build.py @@ -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() diff --git a/linux/advanced/zabbix/trunk/web-pgsql/kaniko-build.py b/linux/advanced/zabbix/trunk/web-pgsql/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/advanced/zabbix/trunk/web-pgsql/kaniko-build.py +++ b/linux/advanced/zabbix/trunk/web-pgsql/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/devel/jdk11/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/devel/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/devel/jdk11/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/devel/jdk11/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/devel/jdk16/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/devel/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/devel/jdk16/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/devel/jdk16/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/devel/jdk6/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/devel/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/devel/jdk6/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/devel/jdk6/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/devel/jdk7/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/devel/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/devel/jdk7/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/devel/jdk7/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/devel/jdk8/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/devel/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/devel/jdk8/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/devel/jdk8/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/devel/main/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/devel/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/devel/main/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/devel/main/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/edge/jdk11/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/edge/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/edge/jdk11/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/edge/jdk11/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/edge/jdk16/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/edge/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/edge/jdk16/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/edge/jdk16/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/edge/jdk6/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/edge/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/edge/jdk6/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/edge/jdk6/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/edge/jdk7/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/edge/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/edge/jdk7/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/edge/jdk7/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/edge/jdk8/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/edge/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/edge/jdk8/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/edge/jdk8/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/edge/main/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/edge/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/edge/main/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/edge/main/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/prod/jdk11/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/prod/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/prod/jdk11/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/prod/jdk11/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/prod/jdk16/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/prod/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/prod/jdk16/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/prod/jdk16/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/prod/jdk6/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/prod/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/prod/jdk6/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/prod/jdk6/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/prod/jdk7/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/prod/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/prod/jdk7/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/prod/jdk7/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/prod/jdk8/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/prod/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/prod/jdk8/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/prod/jdk8/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/epicmorg/prod/main/kaniko-build.py b/linux/discontinued/ecosystem/epicmorg/prod/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/epicmorg/prod/main/kaniko-build.py +++ b/linux/discontinued/ecosystem/epicmorg/prod/main/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/freegpt-webui/1.0/kaniko-build.py b/linux/discontinued/ecosystem/freegpt-webui/1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/freegpt-webui/1.0/kaniko-build.py +++ b/linux/discontinued/ecosystem/freegpt-webui/1.0/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/freegpt-webui/1.1/kaniko-build.py b/linux/discontinued/ecosystem/freegpt-webui/1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/freegpt-webui/1.1/kaniko-build.py +++ b/linux/discontinued/ecosystem/freegpt-webui/1.1/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/freegpt-webui/1.2/kaniko-build.py b/linux/discontinued/ecosystem/freegpt-webui/1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/freegpt-webui/1.2/kaniko-build.py +++ b/linux/discontinued/ecosystem/freegpt-webui/1.2/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/freegpt-webui/1.3.1/kaniko-build.py b/linux/discontinued/ecosystem/freegpt-webui/1.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/freegpt-webui/1.3.1/kaniko-build.py +++ b/linux/discontinued/ecosystem/freegpt-webui/1.3.1/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/freegpt-webui/1.3.2/kaniko-build.py b/linux/discontinued/ecosystem/freegpt-webui/1.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/freegpt-webui/1.3.2/kaniko-build.py +++ b/linux/discontinued/ecosystem/freegpt-webui/1.3.2/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/freegpt-webui/1.3/kaniko-build.py b/linux/discontinued/ecosystem/freegpt-webui/1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/freegpt-webui/1.3/kaniko-build.py +++ b/linux/discontinued/ecosystem/freegpt-webui/1.3/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/freegpt-webui/1.4/kaniko-build.py b/linux/discontinued/ecosystem/freegpt-webui/1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/freegpt-webui/1.4/kaniko-build.py +++ b/linux/discontinued/ecosystem/freegpt-webui/1.4/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/freegpt-webui/latest/kaniko-build.py b/linux/discontinued/ecosystem/freegpt-webui/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/freegpt-webui/latest/kaniko-build.py +++ b/linux/discontinued/ecosystem/freegpt-webui/latest/kaniko-build.py @@ -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() diff --git a/linux/discontinued/ecosystem/syspass/sysPass/kaniko-build.py b/linux/discontinued/ecosystem/syspass/sysPass/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/discontinued/ecosystem/syspass/sysPass/kaniko-build.py +++ b/linux/discontinued/ecosystem/syspass/sysPass/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/apache2/php5.5/kaniko-build.py b/linux/ecosystem/apache2/php5.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/apache2/php5.5/kaniko-build.py +++ b/linux/ecosystem/apache2/php5.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/apache2/php7.0/kaniko-build.py b/linux/ecosystem/apache2/php7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/apache2/php7.0/kaniko-build.py +++ b/linux/ecosystem/apache2/php7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/apache2/php7.1/kaniko-build.py b/linux/ecosystem/apache2/php7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/apache2/php7.1/kaniko-build.py +++ b/linux/ecosystem/apache2/php7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/apache2/php7.2/kaniko-build.py b/linux/ecosystem/apache2/php7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/apache2/php7.2/kaniko-build.py +++ b/linux/ecosystem/apache2/php7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/apache2/php7.3/kaniko-build.py b/linux/ecosystem/apache2/php7.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/apache2/php7.3/kaniko-build.py +++ b/linux/ecosystem/apache2/php7.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/apache2/php7.4/kaniko-build.py b/linux/ecosystem/apache2/php7.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/apache2/php7.4/kaniko-build.py +++ b/linux/ecosystem/apache2/php7.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/apache2/php8.0/kaniko-build.py b/linux/ecosystem/apache2/php8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/apache2/php8.0/kaniko-build.py +++ b/linux/ecosystem/apache2/php8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/apache2/php8.1/kaniko-build.py b/linux/ecosystem/apache2/php8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/apache2/php8.1/kaniko-build.py +++ b/linux/ecosystem/apache2/php8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/apache2/php8.2/kaniko-build.py b/linux/ecosystem/apache2/php8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/apache2/php8.2/kaniko-build.py +++ b/linux/ecosystem/apache2/php8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/apache2/php8.3/kaniko-build.py b/linux/ecosystem/apache2/php8.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/apache2/php8.3/kaniko-build.py +++ b/linux/ecosystem/apache2/php8.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.0.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/1/1.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/1/1.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.1.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/1/1.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/1/1.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.2.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/1/1.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/1/1.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.2.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/1/1.2.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.2.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/1/1.2.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.3.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/1/1.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/1/1.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.0.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.1.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.10.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.10.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.10.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.10.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.10.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.10.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.11.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.11.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.11.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.6/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.11.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.7/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.11.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.8/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.11.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.9/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.11.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.12.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.12.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.12.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.12.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.12.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.12.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.6/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.12.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.2.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.3.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.4.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.5.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.5.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.5.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.5.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.6.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.6.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.6.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.6.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.7.6/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.7.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.7.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.7.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.8.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.8.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.8.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.8.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.8.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.8.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.8.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.8.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.9.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.9.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.9.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.9.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/2/2.9.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.0.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.0.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.0.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.6/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.0.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.7/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.0.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.8/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.0.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.1.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.7/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.1.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.10.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.10.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.10.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.10.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.11.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.11.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.11.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.11.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.11.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.6/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.11.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.2.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.2.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.7/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.2.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.3.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.3.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.4.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.5.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.5.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.5.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.6.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.6.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.7.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.7.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.8.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.8.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.8.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.8.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.9.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.9.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.9.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.9.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.9.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/3/3.9.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.9.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/3/3.9.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.0.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.0.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.0.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.6/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.0.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.7/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.0.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.8/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.0.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.6/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.1.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.10.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.10.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.10.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.10.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.10.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.10.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.10.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.10.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.10.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.10.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.10.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.10.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.11.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.11.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.11.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.11.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.11.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.11.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.11.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.11.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.12.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.12.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.12.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.12.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.12.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.12.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.12.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.12.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.13.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.13.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.13.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.13.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.13.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.13.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.13.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.13.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.10/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.11/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.12/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.6/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.7/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.8/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.9/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.14.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.3.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.4.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.5.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.5.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.5.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.5.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.5.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.6.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.6.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.6.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.7.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.7.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.7.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.7.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.8.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.8.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.5/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.8.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.6/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.8.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.9.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.9.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.9.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.9.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.9.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/4/4.9.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.9.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/4/4.9.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.4/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/7/7.21.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.21.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.12.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.17.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.17.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.17.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/bitbucket/latest/kaniko-build.py b/linux/ecosystem/atlassian/bitbucket/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/bitbucket/latest/kaniko-build.py +++ b/linux/ecosystem/atlassian/bitbucket/latest/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.0.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.0.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.0.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.0.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.0.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.0.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.0.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.0.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.0.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.0.4/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.0.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.0.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.0.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.0.5/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.0.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.0.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.0.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.0.6/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.0.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.0.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.0.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.0.7/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.0.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.0.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.0.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.1.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.1.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.1.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.1.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.1.4/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.1.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.1.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.10.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.10.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.10.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.10.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.10.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.10.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.10.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.10.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.10.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.10.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.10.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.10.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.10.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.10.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.10.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.10.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.11.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.11.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.11.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.11.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.11.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.11.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.11.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.11.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.11.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.11.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.11.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.11.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.12.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.12.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.12.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.12.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.12.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.12.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.12.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.12.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.12.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.12.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.12.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.12.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.12.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.12.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.12.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.12.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.12.4/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.12.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.12.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.12.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.10/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.11/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.12/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.13/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.15/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.17/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.17/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.18/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.18/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.19/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.19/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.20/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.20/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.21/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.21/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.4/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.5/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.6/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.7/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.8/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.13.9/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.13.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.13.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.13.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.14.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.14.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.14.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.14.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.14.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.14.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.14.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.14.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.14.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.14.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.14.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.14.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.14.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.14.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.14.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.14.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.15.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.15.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.15.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.15.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.15.10/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.15.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.15.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.15.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.15.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.15.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.15.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.15.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.15.4/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.15.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.15.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.15.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.15.6/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.15.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.15.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.15.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.15.7/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.15.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.15.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.15.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.15.8/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.15.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.15.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.15.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.15.9/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.15.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.15.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.15.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.2.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.2.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.2.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.2.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.2.4/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.2.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.2.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.2.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.3.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.3.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.3.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.3.4/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.3.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.3.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.3.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.4.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.4.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.4.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.4.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.5.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.5.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.5.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.5.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.5.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.5.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.5.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.10/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.11/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.12/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.13/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.14/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.15/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.16/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.16/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.17/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.17/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.4/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.5/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.6/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.7/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.8/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.6.9/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.6.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.6.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.6.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.7.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.7.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.7.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.7.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.7.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.7.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.7.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.7.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.7.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.7.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.8.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.8.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.8.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.8.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.8.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.8.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.8.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.8.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.8.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.8.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.8.5/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.8.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.8.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.8.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.9.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.9.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.9.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.9.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.9.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.9.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.9.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.9.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/6/6.9.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/6/6.9.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/6/6.9.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/6/6.9.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.19.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.19.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.19.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.19.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.19.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.19.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.16/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.19.16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.19.16/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.19.16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.17/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.19.17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.19.17/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.19.17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.18/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.19.18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.19.18/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.19.18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.19.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.19.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.19.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.19.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.19.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.19.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.4/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.19.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.19.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.19.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.20.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.20.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.20.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.20.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.20.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.20.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.20.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.20.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.20.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/7/7.20.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/7/7.20.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/7/7.20.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/8/8.0.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/8/8.0.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/8/8.0.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/8/8.0.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/8/8.0.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/8/8.0.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/8/8.0.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/8/8.0.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/8/8.0.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/8/8.4.0/kaniko-build.py b/linux/ecosystem/atlassian/confluence/8/8.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/8/8.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/8/8.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/8/8.5.3/kaniko-build.py b/linux/ecosystem/atlassian/confluence/8/8.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/8/8.5.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/8/8.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/8/8.6.1/kaniko-build.py b/linux/ecosystem/atlassian/confluence/8/8.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/8/8.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/8/8.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/8/8.7.2/kaniko-build.py b/linux/ecosystem/atlassian/confluence/8/8.7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/8/8.7.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/8/8.7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/latest/kaniko-build.py b/linux/ecosystem/atlassian/confluence/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/latest/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/latest/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/templates/5/kaniko-build.py b/linux/ecosystem/atlassian/confluence/templates/5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/templates/5/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/templates/5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/confluence/templates/6/kaniko-build.py b/linux/ecosystem/atlassian/confluence/templates/6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/confluence/templates/6/kaniko-build.py +++ b/linux/ecosystem/atlassian/confluence/templates/6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crowd/5/5.1.1/kaniko-build.py b/linux/ecosystem/atlassian/crowd/5/5.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crowd/5/5.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/crowd/5/5.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crowd/latest/kaniko-build.py b/linux/ecosystem/atlassian/crowd/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crowd/latest/kaniko-build.py +++ b/linux/ecosystem/atlassian/crowd/latest/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.0.3/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.0.4/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.0.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.0.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.0.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.0/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.1.1/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.1.2/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.1.3/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.1.4/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.1.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.1.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.1/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.2.1/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.2.2/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.2.3/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.2/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.5.1/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.5.2/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.5.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.5.3/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.5.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.5.4/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.5.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.5.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.5.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.5/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.0/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.0Beta1/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.0Beta1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.0Beta1/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.0Beta1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.0Beta2/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.0Beta2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.0Beta2/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.0Beta2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.1/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.2.1/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.2/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.3/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.4/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.5.a/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.5.a/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.5.a/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.5.a/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.5/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.5a/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.5a/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.5a/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.5a/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/1/1.6.6/kaniko-build.py b/linux/ecosystem/atlassian/crucible/1/1.6.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/1/1.6.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/1/1.6.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/crucible/templates/1/kaniko-build.py b/linux/ecosystem/atlassian/crucible/templates/1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/crucible/templates/1/kaniko-build.py +++ b/linux/ecosystem/atlassian/crucible/templates/1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.B3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.B3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.B3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.B3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0.RC3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.0.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0.M2cc/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0.M2cc/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0.M2cc/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0.M2cc/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0.RC1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0.RC1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0.RC1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0.RC1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.1.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.7/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.8/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.10.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.7/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.8/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.3.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.4.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.7/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.8/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.9/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.5.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.7/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.8/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.9/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.6.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0-EAP-1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0-EAP-1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0-EAP-1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0-EAP-1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0-EAP-2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0-EAP-2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0-EAP-2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0-EAP-2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.10/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.11/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.12/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.13/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.14/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.15/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.7/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.8/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.9/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.7.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.0-m1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.0-m1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.0-m1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.0-m1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/2/2.9.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.0.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.7/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.1.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.10.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.2.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.3.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.7/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.4.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.5.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.6.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.7.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.7.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.7.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.7.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.8.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.8.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.8.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.8.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/3/3.9.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.0.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.7/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.4.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.5.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.6.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.6.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.7.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/4/4.8.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/latest/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/latest/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/latest/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/templates/2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/templates/2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/templates/2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/templates/2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/templates/3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/templates/3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/templates/3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/templates/3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye-crucible/templates/4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye-crucible/templates/4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye-crucible/templates/4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye-crucible/templates/4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.0.1a/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.0.1a/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.0.1a/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.0.1a/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.1.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.2.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.2.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.2.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.2.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.3.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.3.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.3.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.3.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.3.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.3.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.3.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.3.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.3.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.3.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.3.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.3.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.3.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.3.7/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.3.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.3.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.3.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.3.8/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.3.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.3.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.3.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.4.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.4.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.4.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.5.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.5.2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.5.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.5.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.5.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.5.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.5.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.5.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.5.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.6.0/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.6.0Beta1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.6.0Beta1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.6.0Beta1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.6.0Beta1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.6.0Beta2/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.6.0Beta2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.6.0Beta2/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.6.0Beta2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.6.1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.6.3/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.6.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.6.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.6.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.6.4/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.6.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.6.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.6.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.6.5.a/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.6.5.a/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.6.5.a/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.6.5.a/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.6.5/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.6.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.6.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.6.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.6.5a/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.6.5a/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.6.5a/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.6.5a/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/1/1.6.6/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/1/1.6.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/1/1.6.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/1/1.6.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/fisheye/templates/1/kaniko-build.py b/linux/ecosystem/atlassian/fisheye/templates/1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/fisheye/templates/1/kaniko-build.py +++ b/linux/ecosystem/atlassian/fisheye/templates/1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.1.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.1.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.2.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.2.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.2.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.2.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.2.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.2.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.2.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.3.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.3.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.3.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.3.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.3.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.3.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.3.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.4.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.4.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.4.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.4.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.4.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.4.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.4.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.4.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.4.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.4.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/4/4.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/4/4.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/4/4.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/4/4.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.0.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.0.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.0.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.0.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.0.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.0.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.0.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.0.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.0.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.0.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.0.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.0.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.0.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.0.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.0.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.0.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.0.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.0.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.0.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.0.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.0.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.0.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.0.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.0.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.0.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.1.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.1.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.1.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.1.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.1.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.1.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.1.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.1.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.1.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.1.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.1.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.1.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.1.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.1.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.1.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.1.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.1.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.1.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.1.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.1.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.1.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.1.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.4.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/5/5.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/5/5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/5/5.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/5/5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.0.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.0.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.0.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.0.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.0.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.0.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.0.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.0.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.0.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.0.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.0.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.0.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.0.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.0.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.0.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.0.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.0.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.0.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.0.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.0.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.0.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.0.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.0.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.0.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.0.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.0.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.0.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.0.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.0.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.1.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.1.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.1.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.1.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.1.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.1.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.1.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.1.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.1.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.1.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.1.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.1.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.1.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.1.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.1.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.1.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.1.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.1.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.1.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.1.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.1.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.1.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.1.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.1.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.1.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.1.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.2.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.2.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.2.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.2.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.2.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.2.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.2.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.2.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.2.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.2.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.2.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.2.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.2.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.2.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.2.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.2.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.2.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.2.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.2.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.12/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.13/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.14/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.15/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.12/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.13/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.14/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/6/6.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/6/6.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/6/6.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/6/6.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.0.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.0.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.0.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.0.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.0.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.0.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.0.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.0.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.0.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.0.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.0.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.0.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.0.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.0.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.0.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.0.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.0.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.0.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.0.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.0.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.0.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.0.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.0.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.0.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.0.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.0.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.0.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.0.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.1.0-m01/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.1.0-m01/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.1.0-m01/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.1.0-m01/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.1.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.1.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.1.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.1.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.1.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.1.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.1.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.1.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.1.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.1.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.1.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.1.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.1.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.1.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.1.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.1.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.1.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.1.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.1.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.1.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.1.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.1.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.1.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.1.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.1.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.1.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.1.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.10.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.10.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.10.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.10.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.10.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.10.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.10.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.10.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.10.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.10.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.10.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.10.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.11.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.11.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.11.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.11.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.11.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.11.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.11.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.11.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.11.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.11.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.11.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.11.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.12.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.12.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.12.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.12.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.12.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.12.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.12.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.12.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.12.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.12.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.12.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.12.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.12/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.13/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.14/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.15/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.16/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.16/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.17/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.17/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.18/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.18/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.13.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.13.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.13.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.13.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.12/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.13/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.14/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.15/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.2.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.2.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.2.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.2.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.3.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.3.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.3.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.3.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.3.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.3.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.3.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.3.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.3.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.3.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.3.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.3.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.3.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.3.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.3.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.3.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.3.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.3.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.3.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.3.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.3.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.3.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.3.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.3.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.3.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.3.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.3.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.3.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.3.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.3.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.3.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.4.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.4.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.4.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.4.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.4.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.4.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.4.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.4.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.4.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.4.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.4.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.4.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.4.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.4.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.4.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.4.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.5.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.5.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.5.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.5.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.5.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.5.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.5.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.5.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.5.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.5.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.5.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.12/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.13/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.14/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.15/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.16/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.16/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.17/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.17/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.6.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.6.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.6.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.6.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.7.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.7.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.7.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.7.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.7.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.7.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.7.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.7.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.7.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.7.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.8.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.8.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.8.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.8.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.8.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.8.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.8.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.8.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.8.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.8.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.9.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.9.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.9.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.9.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/7/7.9.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/7/7.9.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/7/7.9.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/7/7.9.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.0.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.0.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.0.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.0.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.0.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.0.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.0.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.0.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.0.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.0.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.0.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.0.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.1.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.1.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.1.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.1.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.1.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.1.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.1.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.1.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.1.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.1.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.10.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.10.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.10.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.10.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.10.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.10.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.10.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.10.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.11.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.11.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.11.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.11.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.11.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.11.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.11.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.11.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.12.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.12.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.12.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.12.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.12.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.12.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.12.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.12.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.12.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.12.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.12.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.12.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.12.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.12.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.12.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.12.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.12/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.13/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.14/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.15/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.16/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.16/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.17/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.17/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.18/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.18/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.19/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.19/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.20/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.20/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.21/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.21/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.22/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.22/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.24/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.24/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.24/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.24/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.25/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.25/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.25/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.25/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.26/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.26/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.26/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.26/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.27/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.27/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.27/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.27/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.13.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.13.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.13.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.13.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.14.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.14.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.14.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.14.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.14.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.14.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.14.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.14.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.15.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.15.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.15.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.15.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.15.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.15.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.15.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.15.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.16.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.16.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.16.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.16.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.16.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.16.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.16.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.16.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.16.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.16.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.16.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.16.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.17.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.17.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.17.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.17.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.17.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.17.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.17.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.17.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.18.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.18.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.18.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.18.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.18.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.18.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.18.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.18.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.19.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.19.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.19.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.19.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.19.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.19.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.19.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.19.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.2.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.2.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.2.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.2.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.2.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.2.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.2.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.2.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.2.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.2.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.2.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.2.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.2.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.2.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.2.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.2.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.2.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.2.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.2.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.2.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.2.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.2.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.12/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.13/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.14/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.15/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.16/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.16/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.17/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.17/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.19/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.19/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.20/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.20/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.21/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.21/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.22/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.22/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.23/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.23/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.23/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.23/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.24/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.24/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.24/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.24/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.25/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.25/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.25/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.25/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.26/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.26/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.26/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.26/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.27/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.27/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.27/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.27/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.28/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.28/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.28/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.28/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.29/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.29/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.29/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.29/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.30/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.30/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.30/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.30/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.20.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.20.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.20.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.20.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.21.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.21.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.21.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.21.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.21.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.21.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.21.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.21.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.22.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.22.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.22.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.22.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.22.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.22.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.22.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.22.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.22.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.22.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.22.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.22.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.22.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.22.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.22.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.22.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.22.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.22.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.22.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.22.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.22.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.3.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.3.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.3.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.3.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.3.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.3.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.3.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.3.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.3.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.3.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.3.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.3.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.3.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.3.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.3.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.4.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.4.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.4.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.4.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.12/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.13/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.13/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.14/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.15/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.16/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.16/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.17/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.17/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.18/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.18/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.19/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.19/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.5.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.5.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.5.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.5.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.6.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.6.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.6.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.7.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.7.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.7.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.7.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.8.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.8.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.8.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.8.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.9.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.9.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.9.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.9.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/8/8.9.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/8/8.9.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/8/8.9.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/8/8.9.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.0.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.0.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.0.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.0.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.1.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.1.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.1.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.1.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.1.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.1.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.1.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.1.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.10.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.10.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.10.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.10.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.10.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.10.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.10.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.10.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.10.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.10.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.10.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.10.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.11.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.11.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.11.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.11.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.11.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.11.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.11.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.11.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.11.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.11.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.11.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.11.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.11.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.11.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.11.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.11.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.12.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.12.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.12.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.12.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.12.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.12.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.12.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.12.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.12.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.12.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.12.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.12.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.2.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.2.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.2.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.2.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.2.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.2.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.2.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.2.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.3.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.3.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.3.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.3.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.3.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.3.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.3.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.3.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.3.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.3.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.3.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.3.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.3.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.3.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.10/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.10/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.11/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.11/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.12/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.12/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.14/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.14/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.15/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.15/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.3/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.3/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.4/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.4/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.5/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.5/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.6/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.6/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.7/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.7/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.8/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.8/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.4.9/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.4.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.4.9/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.4.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.5.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.5.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.5.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.5.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.6.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.6.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.7.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.7.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.7.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.7.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.7.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.7.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.8.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.8.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.8.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.8.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.8.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.8.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.9.0/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.9.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.9.0/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.9.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.9.1/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.9.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.9.1/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.9.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/9/9.9.2/kaniko-build.py b/linux/ecosystem/atlassian/jira/9/9.9.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/9/9.9.2/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/9/9.9.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/atlassian/jira/latest/kaniko-build.py b/linux/ecosystem/atlassian/jira/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/atlassian/jira/latest/kaniko-build.py +++ b/linux/ecosystem/atlassian/jira/latest/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/cassandra/3.11/kaniko-build.py b/linux/ecosystem/cassandra/3.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/cassandra/3.11/kaniko-build.py +++ b/linux/ecosystem/cassandra/3.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/electron-release-server/kaniko-build.py b/linux/ecosystem/electron-release-server/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/electron-release-server/kaniko-build.py +++ b/linux/ecosystem/electron-release-server/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/develop/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/develop/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/develop/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/develop/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk11/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk11/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk16/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk16/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk17/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk17/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk18/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk18/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk19/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk19/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk20/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk20/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk21/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk21/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk22/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk22/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk6/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk6/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk7/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk7/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk8/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/jdk8/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/main/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/main/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/python3.10/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/python3.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/python3.10/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/python3.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/python3.11/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/python3.11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/python3.11/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/python3.11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/python3.12/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/python3.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/python3.12/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/python3.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/python3.13/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/python3.13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/python3.13/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/python3.13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/astra/1.7-alse/slim/kaniko-build.py b/linux/ecosystem/epicmorg/astra/1.7-alse/slim/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/astra/1.7-alse/slim/kaniko-build.py +++ b/linux/ecosystem/epicmorg/astra/1.7-alse/slim/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/develop/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/develop/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/develop/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/develop/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk11/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk11/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk16/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk16/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk17/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk17/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk18/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk18/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk19/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk19/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk20/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk20/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk21/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk21/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk22/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk22/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk6/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk6/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk7/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk7/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk8/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/jdk8/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/main/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/main/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/slim/kaniko-build.py b/linux/ecosystem/epicmorg/debian/06-squeeze/slim/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/slim/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/slim/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt b/linux/ecosystem/epicmorg/debian/06-squeeze/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt index 09adbab6c..4c143a21f 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -31,38 +30,4 @@ WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq 391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= -======= ------BEGIN CERTIFICATE----- -MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAxMjEwNDE1WhcNMzIwMjI3MjEwNDE1WjBwMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMSAwHgYDVQQDDBdSdXNzaWFuIFRydXN0ZWQgUm9v -dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMfFOZ8pUAL3+r2n -qqE0Zp52selXsKGFYoG0GM5bwz1bSFtCt+AZQMhkWQheI3poZAToYJu69pHLKS6Q -XBiwBC1cvzYmUYKMYZC7jE5YhEU2bSL0mX7NaMxMDmH2/NwuOVRj8OImVa5s1F4U -zn4Kv3PFlDBjjSjXKVY9kmjUBsXQrIHeaqmUIsPIlNWUnimXS0I0abExqkbdrXbX -YwCOXhOO2pDUx3ckmJlCMUGacUTnylyQW2VsJIyIGA8V0xzdaeUXg0VZ6ZmNUr5Y -Ber/EAOLPb8NYpsAhJe2mXjMB/J9HNsoFMBFJ0lLOT/+dQvjbdRZoOT8eqJpWnVD -U+QL/qEZnz57N88OWM3rabJkRNdU/Z7x5SFIM9FrqtN8xewsiBWBI0K6XFuOBOTD -4V08o4TzJ8+Ccq5XlCUW2L48pZNCYuBDfBh7FxkB7qDgGDiaftEkZZfApRg2E+M9 -G8wkNKTPLDc4wH0FDTijhgxR3Y4PiS1HL2Zhw7bD3CbslmEGgfnnZojNkJtcLeBH -BLa52/dSwNU4WWLubaYSiAmA9IUMX1/RpfpxOxd4Ykmhz97oFbUaDJFipIggx5sX -ePAlkTdWnv+RWBxlJwMQ25oEHmRguNYf4Zr/Rxr9cS93Y+mdXIZaBEE0KS2iLRqa -OiWBki9IMQU4phqPOBAaG7A+eP8PAgMBAAGjZjBkMB0GA1UdDgQWBBTh0YHlzlpf -BKrS6badZrHF+qwshzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzAS -BgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF -AAOCAgEAALIY1wkilt/urfEVM5vKzr6utOeDWCUczmWX/RX4ljpRdgF+5fAIS4vH -tmXkqpSCOVeWUrJV9QvZn6L227ZwuE15cWi8DCDal3Ue90WgAJJZMfTshN4OI8cq -W9E4EG9wglbEtMnObHlms8F3CHmrw3k6KmUkWGoa+/ENmcVl68u/cMRl1JbW2bM+ -/3A+SAg2c6iPDlehczKx2oa95QW0SkPPWGuNA/CE8CpyANIhu9XFrj3RQ3EqeRcS -AQQod1RNuHpfETLU/A2gMmvn/w/sx7TB3W5BPs6rprOA37tutPq9u6FTZOcG1Oqj -C/B7yTqgI7rbyvox7DEXoX7rIiEqyNNUguTk/u3SZ4VXE2kmxdmSh3TQvybfbnXV -4JbCZVaqiZraqc7oZMnRoWrXRG3ztbnbes/9qhRGI7PqXqeKJBztxRTEVj8ONs1d -WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ -D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC -EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq -391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt b/linux/ecosystem/epicmorg/debian/06-squeeze/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt index e50b7d624..2e3f8285d 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -39,46 +38,4 @@ F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= -======= ------BEGIN CERTIFICATE----- -MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAyMTEyNTE5WhcNMjcwMzA2MTEyNTE5WjBvMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMR8wHQYDVQQDDBZSdXNzaWFuIFRydXN0ZWQgU3Vi -IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9YPqBKOk19NFymrE -wehzrhBEgT2atLezpduB24mQ7CiOa/HVpFCDRZzdxqlh8drku408/tTmWzlNH/br -HuQhZ/miWKOf35lpKzjyBd6TPM23uAfJvEOQ2/dnKGGJbsUo1/udKSvxQwVHpVv3 -S80OlluKfhWPDEXQpgyFqIzPoxIQTLZ0deirZwMVHarZ5u8HqHetRuAtmO2ZDGQn -vVOJYAjls+Hiueq7Lj7Oce7CQsTwVZeP+XQx28PAaEZ3y6sQEt6rL06ddpSdoTMp -BnCqTbxW+eWMyjkIn6t9GBtUV45yB1EkHNnj2Ex4GwCiN9T84QQjKSr+8f0psGrZ -vPbCbQAwNFJjisLixnjlGPLKa5vOmNwIh/LAyUW5DjpkCx004LPDuqPpFsKXNKpa -L2Dm6uc0x4Jo5m+gUTVORB6hOSzWnWDj2GWfomLzzyjG81DRGFBpco/O93zecsIN -3SL2Ysjpq1zdoS01CMYxie//9zWvYwzI25/OZigtnpCIrcd2j1Y6dMUFQAzAtHE+ -qsXflSL8HIS+IJEFIQobLlYhHkoE3avgNx5jlu+OLYe0dF0Ykx1PGNjbwqvTX37R -Cn32NMjlotW2QcGEZhDKj+3urZizp5xdTPZitA+aEjZM/Ni71VOdiOP0igbw6asZ -2fxdozZ1TnSSYNYvNATwthNmZysCAwEAAaOCAeUwggHhMBIGA1UdEwEB/wQIMAYB -Af8CAQAwDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTR4XENCy2BTm6KSo9MI7NM -XqtpCzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzCBxwYIKwYBBQUH -AQEEgbowgbcwOwYIKwYBBQUHMAKGL2h0dHA6Ly9yb3N0ZWxlY29tLnJ1L2NkcC9y -b290Y2Ffc3NsX3JzYTIwMjIuY3J0MDsGCCsGAQUFBzAChi9odHRwOi8vY29tcGFu -eS5ydC5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNydDA7BggrBgEFBQcwAoYv -aHR0cDovL3JlZXN0ci1wa2kucnUvY2RwL3Jvb3RjYV9zc2xfcnNhMjAyMi5jcnQw -gbAGA1UdHwSBqDCBpTA1oDOgMYYvaHR0cDovL3Jvc3RlbGVjb20ucnUvY2RwL3Jv -b3RjYV9zc2xfcnNhMjAyMi5jcmwwNaAzoDGGL2h0dHA6Ly9jb21wYW55LnJ0LnJ1 -L2NkcC9yb290Y2Ffc3NsX3JzYTIwMjIuY3JsMDWgM6Axhi9odHRwOi8vcmVlc3Ry -LXBraS5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNybDANBgkqhkiG9w0BAQsF -AAOCAgEARBVzZls79AdiSCpar15dA5Hr/rrT4WbrOfzlpI+xrLeRPrUG6eUWIW4v -Sui1yx3iqGLCjPcKb+HOTwoRMbI6ytP/ndp3TlYua2advYBEhSvjs+4vDZNwXr/D -anbwIWdurZmViQRBDFebpkvnIvru/RpWud/5r624Wp8voZMRtj/cm6aI9LtvBfT9 -cfzhOaexI/99c14dyiuk1+6QhdwKaCRTc1mdfNQmnfWNRbfWhWBlK3h4GGE9JK33 -Gk8ZS8DMrkdAh0xby4xAQ/mSWAfWrBmfzlOqGyoB1U47WTOeqNbWkkoAP2ys94+s -Jg4NTkiDVtXRF6nr6fYi0bSOvOFg0IQrMXO2Y8gyg9ARdPJwKtvWX8VPADCYMiWH -h4n8bZokIrImVKLDQKHY4jCsND2HHdJfnrdL2YJw1qFskNO4cSNmZydw0Wkgjv9k -F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F -E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe -GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p -ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/develop/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/develop/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/develop/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/develop/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk11/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk11/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk16/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk16/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk17/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk17/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk18/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk18/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk19/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk19/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk20/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk20/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk21/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk21/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk22/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk22/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk6/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk6/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk7/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk7/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk8/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/jdk8/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/main/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/main/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/slim/kaniko-build.py b/linux/ecosystem/epicmorg/debian/07-wheezy/slim/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/slim/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/slim/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt b/linux/ecosystem/epicmorg/debian/07-wheezy/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt index 09adbab6c..4c143a21f 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -31,38 +30,4 @@ WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq 391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= -======= ------BEGIN CERTIFICATE----- -MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAxMjEwNDE1WhcNMzIwMjI3MjEwNDE1WjBwMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMSAwHgYDVQQDDBdSdXNzaWFuIFRydXN0ZWQgUm9v -dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMfFOZ8pUAL3+r2n -qqE0Zp52selXsKGFYoG0GM5bwz1bSFtCt+AZQMhkWQheI3poZAToYJu69pHLKS6Q -XBiwBC1cvzYmUYKMYZC7jE5YhEU2bSL0mX7NaMxMDmH2/NwuOVRj8OImVa5s1F4U -zn4Kv3PFlDBjjSjXKVY9kmjUBsXQrIHeaqmUIsPIlNWUnimXS0I0abExqkbdrXbX -YwCOXhOO2pDUx3ckmJlCMUGacUTnylyQW2VsJIyIGA8V0xzdaeUXg0VZ6ZmNUr5Y -Ber/EAOLPb8NYpsAhJe2mXjMB/J9HNsoFMBFJ0lLOT/+dQvjbdRZoOT8eqJpWnVD -U+QL/qEZnz57N88OWM3rabJkRNdU/Z7x5SFIM9FrqtN8xewsiBWBI0K6XFuOBOTD -4V08o4TzJ8+Ccq5XlCUW2L48pZNCYuBDfBh7FxkB7qDgGDiaftEkZZfApRg2E+M9 -G8wkNKTPLDc4wH0FDTijhgxR3Y4PiS1HL2Zhw7bD3CbslmEGgfnnZojNkJtcLeBH -BLa52/dSwNU4WWLubaYSiAmA9IUMX1/RpfpxOxd4Ykmhz97oFbUaDJFipIggx5sX -ePAlkTdWnv+RWBxlJwMQ25oEHmRguNYf4Zr/Rxr9cS93Y+mdXIZaBEE0KS2iLRqa -OiWBki9IMQU4phqPOBAaG7A+eP8PAgMBAAGjZjBkMB0GA1UdDgQWBBTh0YHlzlpf -BKrS6badZrHF+qwshzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzAS -BgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF -AAOCAgEAALIY1wkilt/urfEVM5vKzr6utOeDWCUczmWX/RX4ljpRdgF+5fAIS4vH -tmXkqpSCOVeWUrJV9QvZn6L227ZwuE15cWi8DCDal3Ue90WgAJJZMfTshN4OI8cq -W9E4EG9wglbEtMnObHlms8F3CHmrw3k6KmUkWGoa+/ENmcVl68u/cMRl1JbW2bM+ -/3A+SAg2c6iPDlehczKx2oa95QW0SkPPWGuNA/CE8CpyANIhu9XFrj3RQ3EqeRcS -AQQod1RNuHpfETLU/A2gMmvn/w/sx7TB3W5BPs6rprOA37tutPq9u6FTZOcG1Oqj -C/B7yTqgI7rbyvox7DEXoX7rIiEqyNNUguTk/u3SZ4VXE2kmxdmSh3TQvybfbnXV -4JbCZVaqiZraqc7oZMnRoWrXRG3ztbnbes/9qhRGI7PqXqeKJBztxRTEVj8ONs1d -WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ -D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC -EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq -391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/07-wheezy/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt b/linux/ecosystem/epicmorg/debian/07-wheezy/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt index e50b7d624..2e3f8285d 100644 --- a/linux/ecosystem/epicmorg/debian/07-wheezy/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/07-wheezy/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -39,46 +38,4 @@ F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= -======= ------BEGIN CERTIFICATE----- -MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAyMTEyNTE5WhcNMjcwMzA2MTEyNTE5WjBvMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMR8wHQYDVQQDDBZSdXNzaWFuIFRydXN0ZWQgU3Vi -IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9YPqBKOk19NFymrE -wehzrhBEgT2atLezpduB24mQ7CiOa/HVpFCDRZzdxqlh8drku408/tTmWzlNH/br -HuQhZ/miWKOf35lpKzjyBd6TPM23uAfJvEOQ2/dnKGGJbsUo1/udKSvxQwVHpVv3 -S80OlluKfhWPDEXQpgyFqIzPoxIQTLZ0deirZwMVHarZ5u8HqHetRuAtmO2ZDGQn -vVOJYAjls+Hiueq7Lj7Oce7CQsTwVZeP+XQx28PAaEZ3y6sQEt6rL06ddpSdoTMp -BnCqTbxW+eWMyjkIn6t9GBtUV45yB1EkHNnj2Ex4GwCiN9T84QQjKSr+8f0psGrZ -vPbCbQAwNFJjisLixnjlGPLKa5vOmNwIh/LAyUW5DjpkCx004LPDuqPpFsKXNKpa -L2Dm6uc0x4Jo5m+gUTVORB6hOSzWnWDj2GWfomLzzyjG81DRGFBpco/O93zecsIN -3SL2Ysjpq1zdoS01CMYxie//9zWvYwzI25/OZigtnpCIrcd2j1Y6dMUFQAzAtHE+ -qsXflSL8HIS+IJEFIQobLlYhHkoE3avgNx5jlu+OLYe0dF0Ykx1PGNjbwqvTX37R -Cn32NMjlotW2QcGEZhDKj+3urZizp5xdTPZitA+aEjZM/Ni71VOdiOP0igbw6asZ -2fxdozZ1TnSSYNYvNATwthNmZysCAwEAAaOCAeUwggHhMBIGA1UdEwEB/wQIMAYB -Af8CAQAwDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTR4XENCy2BTm6KSo9MI7NM -XqtpCzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzCBxwYIKwYBBQUH -AQEEgbowgbcwOwYIKwYBBQUHMAKGL2h0dHA6Ly9yb3N0ZWxlY29tLnJ1L2NkcC9y -b290Y2Ffc3NsX3JzYTIwMjIuY3J0MDsGCCsGAQUFBzAChi9odHRwOi8vY29tcGFu -eS5ydC5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNydDA7BggrBgEFBQcwAoYv -aHR0cDovL3JlZXN0ci1wa2kucnUvY2RwL3Jvb3RjYV9zc2xfcnNhMjAyMi5jcnQw -gbAGA1UdHwSBqDCBpTA1oDOgMYYvaHR0cDovL3Jvc3RlbGVjb20ucnUvY2RwL3Jv -b3RjYV9zc2xfcnNhMjAyMi5jcmwwNaAzoDGGL2h0dHA6Ly9jb21wYW55LnJ0LnJ1 -L2NkcC9yb290Y2Ffc3NsX3JzYTIwMjIuY3JsMDWgM6Axhi9odHRwOi8vcmVlc3Ry -LXBraS5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNybDANBgkqhkiG9w0BAQsF -AAOCAgEARBVzZls79AdiSCpar15dA5Hr/rrT4WbrOfzlpI+xrLeRPrUG6eUWIW4v -Sui1yx3iqGLCjPcKb+HOTwoRMbI6ytP/ndp3TlYua2advYBEhSvjs+4vDZNwXr/D -anbwIWdurZmViQRBDFebpkvnIvru/RpWud/5r624Wp8voZMRtj/cm6aI9LtvBfT9 -cfzhOaexI/99c14dyiuk1+6QhdwKaCRTc1mdfNQmnfWNRbfWhWBlK3h4GGE9JK33 -Gk8ZS8DMrkdAh0xby4xAQ/mSWAfWrBmfzlOqGyoB1U47WTOeqNbWkkoAP2ys94+s -Jg4NTkiDVtXRF6nr6fYi0bSOvOFg0IQrMXO2Y8gyg9ARdPJwKtvWX8VPADCYMiWH -h4n8bZokIrImVKLDQKHY4jCsND2HHdJfnrdL2YJw1qFskNO4cSNmZydw0Wkgjv9k -F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F -E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe -GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p -ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/develop/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/develop/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/develop/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/develop/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk11/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk11/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk16/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk16/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk17/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk17/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk18/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk18/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk19/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk19/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk20/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk20/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk21/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk21/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk22/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk22/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk6/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk6/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk7/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk7/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/jdk8/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/jdk8/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/main/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/main/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/slim/kaniko-build.py b/linux/ecosystem/epicmorg/debian/08-jessie/slim/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/slim/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/08-jessie/slim/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt b/linux/ecosystem/epicmorg/debian/08-jessie/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt index 09adbab6c..4c143a21f 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/08-jessie/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -31,38 +30,4 @@ WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq 391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= -======= ------BEGIN CERTIFICATE----- -MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAxMjEwNDE1WhcNMzIwMjI3MjEwNDE1WjBwMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMSAwHgYDVQQDDBdSdXNzaWFuIFRydXN0ZWQgUm9v -dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMfFOZ8pUAL3+r2n -qqE0Zp52selXsKGFYoG0GM5bwz1bSFtCt+AZQMhkWQheI3poZAToYJu69pHLKS6Q -XBiwBC1cvzYmUYKMYZC7jE5YhEU2bSL0mX7NaMxMDmH2/NwuOVRj8OImVa5s1F4U -zn4Kv3PFlDBjjSjXKVY9kmjUBsXQrIHeaqmUIsPIlNWUnimXS0I0abExqkbdrXbX -YwCOXhOO2pDUx3ckmJlCMUGacUTnylyQW2VsJIyIGA8V0xzdaeUXg0VZ6ZmNUr5Y -Ber/EAOLPb8NYpsAhJe2mXjMB/J9HNsoFMBFJ0lLOT/+dQvjbdRZoOT8eqJpWnVD -U+QL/qEZnz57N88OWM3rabJkRNdU/Z7x5SFIM9FrqtN8xewsiBWBI0K6XFuOBOTD -4V08o4TzJ8+Ccq5XlCUW2L48pZNCYuBDfBh7FxkB7qDgGDiaftEkZZfApRg2E+M9 -G8wkNKTPLDc4wH0FDTijhgxR3Y4PiS1HL2Zhw7bD3CbslmEGgfnnZojNkJtcLeBH -BLa52/dSwNU4WWLubaYSiAmA9IUMX1/RpfpxOxd4Ykmhz97oFbUaDJFipIggx5sX -ePAlkTdWnv+RWBxlJwMQ25oEHmRguNYf4Zr/Rxr9cS93Y+mdXIZaBEE0KS2iLRqa -OiWBki9IMQU4phqPOBAaG7A+eP8PAgMBAAGjZjBkMB0GA1UdDgQWBBTh0YHlzlpf -BKrS6badZrHF+qwshzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzAS -BgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF -AAOCAgEAALIY1wkilt/urfEVM5vKzr6utOeDWCUczmWX/RX4ljpRdgF+5fAIS4vH -tmXkqpSCOVeWUrJV9QvZn6L227ZwuE15cWi8DCDal3Ue90WgAJJZMfTshN4OI8cq -W9E4EG9wglbEtMnObHlms8F3CHmrw3k6KmUkWGoa+/ENmcVl68u/cMRl1JbW2bM+ -/3A+SAg2c6iPDlehczKx2oa95QW0SkPPWGuNA/CE8CpyANIhu9XFrj3RQ3EqeRcS -AQQod1RNuHpfETLU/A2gMmvn/w/sx7TB3W5BPs6rprOA37tutPq9u6FTZOcG1Oqj -C/B7yTqgI7rbyvox7DEXoX7rIiEqyNNUguTk/u3SZ4VXE2kmxdmSh3TQvybfbnXV -4JbCZVaqiZraqc7oZMnRoWrXRG3ztbnbes/9qhRGI7PqXqeKJBztxRTEVj8ONs1d -WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ -D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC -EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq -391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/08-jessie/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt b/linux/ecosystem/epicmorg/debian/08-jessie/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt index e50b7d624..2e3f8285d 100644 --- a/linux/ecosystem/epicmorg/debian/08-jessie/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/08-jessie/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -39,46 +38,4 @@ F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= -======= ------BEGIN CERTIFICATE----- -MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAyMTEyNTE5WhcNMjcwMzA2MTEyNTE5WjBvMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMR8wHQYDVQQDDBZSdXNzaWFuIFRydXN0ZWQgU3Vi -IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9YPqBKOk19NFymrE -wehzrhBEgT2atLezpduB24mQ7CiOa/HVpFCDRZzdxqlh8drku408/tTmWzlNH/br -HuQhZ/miWKOf35lpKzjyBd6TPM23uAfJvEOQ2/dnKGGJbsUo1/udKSvxQwVHpVv3 -S80OlluKfhWPDEXQpgyFqIzPoxIQTLZ0deirZwMVHarZ5u8HqHetRuAtmO2ZDGQn -vVOJYAjls+Hiueq7Lj7Oce7CQsTwVZeP+XQx28PAaEZ3y6sQEt6rL06ddpSdoTMp -BnCqTbxW+eWMyjkIn6t9GBtUV45yB1EkHNnj2Ex4GwCiN9T84QQjKSr+8f0psGrZ -vPbCbQAwNFJjisLixnjlGPLKa5vOmNwIh/LAyUW5DjpkCx004LPDuqPpFsKXNKpa -L2Dm6uc0x4Jo5m+gUTVORB6hOSzWnWDj2GWfomLzzyjG81DRGFBpco/O93zecsIN -3SL2Ysjpq1zdoS01CMYxie//9zWvYwzI25/OZigtnpCIrcd2j1Y6dMUFQAzAtHE+ -qsXflSL8HIS+IJEFIQobLlYhHkoE3avgNx5jlu+OLYe0dF0Ykx1PGNjbwqvTX37R -Cn32NMjlotW2QcGEZhDKj+3urZizp5xdTPZitA+aEjZM/Ni71VOdiOP0igbw6asZ -2fxdozZ1TnSSYNYvNATwthNmZysCAwEAAaOCAeUwggHhMBIGA1UdEwEB/wQIMAYB -Af8CAQAwDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTR4XENCy2BTm6KSo9MI7NM -XqtpCzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzCBxwYIKwYBBQUH -AQEEgbowgbcwOwYIKwYBBQUHMAKGL2h0dHA6Ly9yb3N0ZWxlY29tLnJ1L2NkcC9y -b290Y2Ffc3NsX3JzYTIwMjIuY3J0MDsGCCsGAQUFBzAChi9odHRwOi8vY29tcGFu -eS5ydC5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNydDA7BggrBgEFBQcwAoYv -aHR0cDovL3JlZXN0ci1wa2kucnUvY2RwL3Jvb3RjYV9zc2xfcnNhMjAyMi5jcnQw -gbAGA1UdHwSBqDCBpTA1oDOgMYYvaHR0cDovL3Jvc3RlbGVjb20ucnUvY2RwL3Jv -b3RjYV9zc2xfcnNhMjAyMi5jcmwwNaAzoDGGL2h0dHA6Ly9jb21wYW55LnJ0LnJ1 -L2NkcC9yb290Y2Ffc3NsX3JzYTIwMjIuY3JsMDWgM6Axhi9odHRwOi8vcmVlc3Ry -LXBraS5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNybDANBgkqhkiG9w0BAQsF -AAOCAgEARBVzZls79AdiSCpar15dA5Hr/rrT4WbrOfzlpI+xrLeRPrUG6eUWIW4v -Sui1yx3iqGLCjPcKb+HOTwoRMbI6ytP/ndp3TlYua2advYBEhSvjs+4vDZNwXr/D -anbwIWdurZmViQRBDFebpkvnIvru/RpWud/5r624Wp8voZMRtj/cm6aI9LtvBfT9 -cfzhOaexI/99c14dyiuk1+6QhdwKaCRTc1mdfNQmnfWNRbfWhWBlK3h4GGE9JK33 -Gk8ZS8DMrkdAh0xby4xAQ/mSWAfWrBmfzlOqGyoB1U47WTOeqNbWkkoAP2ys94+s -Jg4NTkiDVtXRF6nr6fYi0bSOvOFg0IQrMXO2Y8gyg9ARdPJwKtvWX8VPADCYMiWH -h4n8bZokIrImVKLDQKHY4jCsND2HHdJfnrdL2YJw1qFskNO4cSNmZydw0Wkgjv9k -F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F -E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe -GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p -ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/develop/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/develop/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/develop/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/develop/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk11/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk11/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk16/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk16/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk17/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk17/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk18/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk18/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk19/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk19/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk20/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk20/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk21/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk21/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk22/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk22/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk6/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk6/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk7/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk7/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/jdk8/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/jdk8/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/main/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/main/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/slim/kaniko-build.py b/linux/ecosystem/epicmorg/debian/09-stretch/slim/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/slim/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/09-stretch/slim/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt b/linux/ecosystem/epicmorg/debian/09-stretch/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt index 09adbab6c..4c143a21f 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/09-stretch/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -31,38 +30,4 @@ WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq 391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= -======= ------BEGIN CERTIFICATE----- -MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAxMjEwNDE1WhcNMzIwMjI3MjEwNDE1WjBwMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMSAwHgYDVQQDDBdSdXNzaWFuIFRydXN0ZWQgUm9v -dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMfFOZ8pUAL3+r2n -qqE0Zp52selXsKGFYoG0GM5bwz1bSFtCt+AZQMhkWQheI3poZAToYJu69pHLKS6Q -XBiwBC1cvzYmUYKMYZC7jE5YhEU2bSL0mX7NaMxMDmH2/NwuOVRj8OImVa5s1F4U -zn4Kv3PFlDBjjSjXKVY9kmjUBsXQrIHeaqmUIsPIlNWUnimXS0I0abExqkbdrXbX -YwCOXhOO2pDUx3ckmJlCMUGacUTnylyQW2VsJIyIGA8V0xzdaeUXg0VZ6ZmNUr5Y -Ber/EAOLPb8NYpsAhJe2mXjMB/J9HNsoFMBFJ0lLOT/+dQvjbdRZoOT8eqJpWnVD -U+QL/qEZnz57N88OWM3rabJkRNdU/Z7x5SFIM9FrqtN8xewsiBWBI0K6XFuOBOTD -4V08o4TzJ8+Ccq5XlCUW2L48pZNCYuBDfBh7FxkB7qDgGDiaftEkZZfApRg2E+M9 -G8wkNKTPLDc4wH0FDTijhgxR3Y4PiS1HL2Zhw7bD3CbslmEGgfnnZojNkJtcLeBH -BLa52/dSwNU4WWLubaYSiAmA9IUMX1/RpfpxOxd4Ykmhz97oFbUaDJFipIggx5sX -ePAlkTdWnv+RWBxlJwMQ25oEHmRguNYf4Zr/Rxr9cS93Y+mdXIZaBEE0KS2iLRqa -OiWBki9IMQU4phqPOBAaG7A+eP8PAgMBAAGjZjBkMB0GA1UdDgQWBBTh0YHlzlpf -BKrS6badZrHF+qwshzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzAS -BgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF -AAOCAgEAALIY1wkilt/urfEVM5vKzr6utOeDWCUczmWX/RX4ljpRdgF+5fAIS4vH -tmXkqpSCOVeWUrJV9QvZn6L227ZwuE15cWi8DCDal3Ue90WgAJJZMfTshN4OI8cq -W9E4EG9wglbEtMnObHlms8F3CHmrw3k6KmUkWGoa+/ENmcVl68u/cMRl1JbW2bM+ -/3A+SAg2c6iPDlehczKx2oa95QW0SkPPWGuNA/CE8CpyANIhu9XFrj3RQ3EqeRcS -AQQod1RNuHpfETLU/A2gMmvn/w/sx7TB3W5BPs6rprOA37tutPq9u6FTZOcG1Oqj -C/B7yTqgI7rbyvox7DEXoX7rIiEqyNNUguTk/u3SZ4VXE2kmxdmSh3TQvybfbnXV -4JbCZVaqiZraqc7oZMnRoWrXRG3ztbnbes/9qhRGI7PqXqeKJBztxRTEVj8ONs1d -WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ -D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC -EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq -391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/09-stretch/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt b/linux/ecosystem/epicmorg/debian/09-stretch/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt index e50b7d624..2e3f8285d 100644 --- a/linux/ecosystem/epicmorg/debian/09-stretch/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/09-stretch/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -39,46 +38,4 @@ F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= -======= ------BEGIN CERTIFICATE----- -MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAyMTEyNTE5WhcNMjcwMzA2MTEyNTE5WjBvMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMR8wHQYDVQQDDBZSdXNzaWFuIFRydXN0ZWQgU3Vi -IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9YPqBKOk19NFymrE -wehzrhBEgT2atLezpduB24mQ7CiOa/HVpFCDRZzdxqlh8drku408/tTmWzlNH/br -HuQhZ/miWKOf35lpKzjyBd6TPM23uAfJvEOQ2/dnKGGJbsUo1/udKSvxQwVHpVv3 -S80OlluKfhWPDEXQpgyFqIzPoxIQTLZ0deirZwMVHarZ5u8HqHetRuAtmO2ZDGQn -vVOJYAjls+Hiueq7Lj7Oce7CQsTwVZeP+XQx28PAaEZ3y6sQEt6rL06ddpSdoTMp -BnCqTbxW+eWMyjkIn6t9GBtUV45yB1EkHNnj2Ex4GwCiN9T84QQjKSr+8f0psGrZ -vPbCbQAwNFJjisLixnjlGPLKa5vOmNwIh/LAyUW5DjpkCx004LPDuqPpFsKXNKpa -L2Dm6uc0x4Jo5m+gUTVORB6hOSzWnWDj2GWfomLzzyjG81DRGFBpco/O93zecsIN -3SL2Ysjpq1zdoS01CMYxie//9zWvYwzI25/OZigtnpCIrcd2j1Y6dMUFQAzAtHE+ -qsXflSL8HIS+IJEFIQobLlYhHkoE3avgNx5jlu+OLYe0dF0Ykx1PGNjbwqvTX37R -Cn32NMjlotW2QcGEZhDKj+3urZizp5xdTPZitA+aEjZM/Ni71VOdiOP0igbw6asZ -2fxdozZ1TnSSYNYvNATwthNmZysCAwEAAaOCAeUwggHhMBIGA1UdEwEB/wQIMAYB -Af8CAQAwDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTR4XENCy2BTm6KSo9MI7NM -XqtpCzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzCBxwYIKwYBBQUH -AQEEgbowgbcwOwYIKwYBBQUHMAKGL2h0dHA6Ly9yb3N0ZWxlY29tLnJ1L2NkcC9y -b290Y2Ffc3NsX3JzYTIwMjIuY3J0MDsGCCsGAQUFBzAChi9odHRwOi8vY29tcGFu -eS5ydC5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNydDA7BggrBgEFBQcwAoYv -aHR0cDovL3JlZXN0ci1wa2kucnUvY2RwL3Jvb3RjYV9zc2xfcnNhMjAyMi5jcnQw -gbAGA1UdHwSBqDCBpTA1oDOgMYYvaHR0cDovL3Jvc3RlbGVjb20ucnUvY2RwL3Jv -b3RjYV9zc2xfcnNhMjAyMi5jcmwwNaAzoDGGL2h0dHA6Ly9jb21wYW55LnJ0LnJ1 -L2NkcC9yb290Y2Ffc3NsX3JzYTIwMjIuY3JsMDWgM6Axhi9odHRwOi8vcmVlc3Ry -LXBraS5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNybDANBgkqhkiG9w0BAQsF -AAOCAgEARBVzZls79AdiSCpar15dA5Hr/rrT4WbrOfzlpI+xrLeRPrUG6eUWIW4v -Sui1yx3iqGLCjPcKb+HOTwoRMbI6ytP/ndp3TlYua2advYBEhSvjs+4vDZNwXr/D -anbwIWdurZmViQRBDFebpkvnIvru/RpWud/5r624Wp8voZMRtj/cm6aI9LtvBfT9 -cfzhOaexI/99c14dyiuk1+6QhdwKaCRTc1mdfNQmnfWNRbfWhWBlK3h4GGE9JK33 -Gk8ZS8DMrkdAh0xby4xAQ/mSWAfWrBmfzlOqGyoB1U47WTOeqNbWkkoAP2ys94+s -Jg4NTkiDVtXRF6nr6fYi0bSOvOFg0IQrMXO2Y8gyg9ARdPJwKtvWX8VPADCYMiWH -h4n8bZokIrImVKLDQKHY4jCsND2HHdJfnrdL2YJw1qFskNO4cSNmZydw0Wkgjv9k -F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F -E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe -GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p -ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/10-buster/develop/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/develop/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/develop/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/develop/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk11/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk11/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk16/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk16/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk17/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk17/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk18/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk18/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk19/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk19/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk20/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk20/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk21/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk21/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk22/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk22/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk6/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk6/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk7/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk7/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/jdk8/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/jdk8/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/main/.env b/linux/ecosystem/epicmorg/debian/10-buster/main/.env deleted file mode 100644 index f0362f875..000000000 --- a/linux/ecosystem/epicmorg/debian/10-buster/main/.env +++ /dev/null @@ -1,29 +0,0 @@ -################################################################## -# perforce client binary -################################################################## -P4_VERSION=r23.2 -P4_DOWNLOAD_URL=https://filehost.perforce.com/perforce/${P4_VERSION}/bin.linux26x86_64/p4 - -################################################################## -# 7z official binary -################################################################## -SZ_VERSION=7z2407 -SZ_DOWNLOAD_URL=https://www.7-zip.org/a/${SZ_VERSION}-linux-x64.tar.xz - -################################################################## -# LazyGit official binary -################################################################## -LAZYGIT_VERSION=0.42.0 -LAZYGIT_DOWNLOAD_URL=https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz - -################################################################## -# dumb init -################################################################## -DUMB_INIT_VERSION=1.2.5 -DUMB_INIT_DOWNLOAD_URL=https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_x86_64 - -################################################################## -# gosu -################################################################## -GOSU_VER=1.17 -GOSU_DOWNLOAD_URL=https://github.com/tianon/gosu/releases/download/${GOSU_VER}/gosu-amd64 diff --git a/linux/ecosystem/epicmorg/debian/10-buster/main/docker-compose.yml b/linux/ecosystem/epicmorg/debian/10-buster/main/docker-compose.yml index e4f3133c6..3e032862e 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/main/docker-compose.yml +++ b/linux/ecosystem/epicmorg/debian/10-buster/main/docker-compose.yml @@ -4,14 +4,3 @@ services: image: "epicmorg/debian:buster" build: context: . - args: - P4_#version: ${P4_VERSION} - P4_DOWNLOAD_URL: ${P4_DOWNLOAD_URL} - SZ_#version: ${SZ_VERSION} - SZ_DOWNLOAD_URL: ${SZ_DOWNLOAD_URL} - LAZYGIT_#version: ${LAZYGIT_VERSION} - LAZYGIT_DOWNLOAD_URL: ${LAZYGIT_DOWNLOAD_URL} - DUMB_INIT_#version: ${DUMB_INIT_VERSION} - DUMB_INIT_DOWNLOAD_URL: ${DUMB_INIT_DOWNLOAD_URL} - GOSU_VER: ${GOSU_VER} - GOSU_DOWNLOAD_URL: ${GOSU_DOWNLOAD_URL} diff --git a/linux/ecosystem/epicmorg/debian/10-buster/main/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/main/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/slim/kaniko-build.py b/linux/ecosystem/epicmorg/debian/10-buster/slim/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/slim/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/10-buster/slim/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/10-buster/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt b/linux/ecosystem/epicmorg/debian/10-buster/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt index 09adbab6c..4c143a21f 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/10-buster/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -31,38 +30,4 @@ WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq 391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= -======= ------BEGIN CERTIFICATE----- -MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAxMjEwNDE1WhcNMzIwMjI3MjEwNDE1WjBwMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMSAwHgYDVQQDDBdSdXNzaWFuIFRydXN0ZWQgUm9v -dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMfFOZ8pUAL3+r2n -qqE0Zp52selXsKGFYoG0GM5bwz1bSFtCt+AZQMhkWQheI3poZAToYJu69pHLKS6Q -XBiwBC1cvzYmUYKMYZC7jE5YhEU2bSL0mX7NaMxMDmH2/NwuOVRj8OImVa5s1F4U -zn4Kv3PFlDBjjSjXKVY9kmjUBsXQrIHeaqmUIsPIlNWUnimXS0I0abExqkbdrXbX -YwCOXhOO2pDUx3ckmJlCMUGacUTnylyQW2VsJIyIGA8V0xzdaeUXg0VZ6ZmNUr5Y -Ber/EAOLPb8NYpsAhJe2mXjMB/J9HNsoFMBFJ0lLOT/+dQvjbdRZoOT8eqJpWnVD -U+QL/qEZnz57N88OWM3rabJkRNdU/Z7x5SFIM9FrqtN8xewsiBWBI0K6XFuOBOTD -4V08o4TzJ8+Ccq5XlCUW2L48pZNCYuBDfBh7FxkB7qDgGDiaftEkZZfApRg2E+M9 -G8wkNKTPLDc4wH0FDTijhgxR3Y4PiS1HL2Zhw7bD3CbslmEGgfnnZojNkJtcLeBH -BLa52/dSwNU4WWLubaYSiAmA9IUMX1/RpfpxOxd4Ykmhz97oFbUaDJFipIggx5sX -ePAlkTdWnv+RWBxlJwMQ25oEHmRguNYf4Zr/Rxr9cS93Y+mdXIZaBEE0KS2iLRqa -OiWBki9IMQU4phqPOBAaG7A+eP8PAgMBAAGjZjBkMB0GA1UdDgQWBBTh0YHlzlpf -BKrS6badZrHF+qwshzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzAS -BgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF -AAOCAgEAALIY1wkilt/urfEVM5vKzr6utOeDWCUczmWX/RX4ljpRdgF+5fAIS4vH -tmXkqpSCOVeWUrJV9QvZn6L227ZwuE15cWi8DCDal3Ue90WgAJJZMfTshN4OI8cq -W9E4EG9wglbEtMnObHlms8F3CHmrw3k6KmUkWGoa+/ENmcVl68u/cMRl1JbW2bM+ -/3A+SAg2c6iPDlehczKx2oa95QW0SkPPWGuNA/CE8CpyANIhu9XFrj3RQ3EqeRcS -AQQod1RNuHpfETLU/A2gMmvn/w/sx7TB3W5BPs6rprOA37tutPq9u6FTZOcG1Oqj -C/B7yTqgI7rbyvox7DEXoX7rIiEqyNNUguTk/u3SZ4VXE2kmxdmSh3TQvybfbnXV -4JbCZVaqiZraqc7oZMnRoWrXRG3ztbnbes/9qhRGI7PqXqeKJBztxRTEVj8ONs1d -WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ -D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC -EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq -391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/10-buster/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt b/linux/ecosystem/epicmorg/debian/10-buster/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt index e50b7d624..2e3f8285d 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/10-buster/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -39,46 +38,4 @@ F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= -======= ------BEGIN CERTIFICATE----- -MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAyMTEyNTE5WhcNMjcwMzA2MTEyNTE5WjBvMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMR8wHQYDVQQDDBZSdXNzaWFuIFRydXN0ZWQgU3Vi -IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9YPqBKOk19NFymrE -wehzrhBEgT2atLezpduB24mQ7CiOa/HVpFCDRZzdxqlh8drku408/tTmWzlNH/br -HuQhZ/miWKOf35lpKzjyBd6TPM23uAfJvEOQ2/dnKGGJbsUo1/udKSvxQwVHpVv3 -S80OlluKfhWPDEXQpgyFqIzPoxIQTLZ0deirZwMVHarZ5u8HqHetRuAtmO2ZDGQn -vVOJYAjls+Hiueq7Lj7Oce7CQsTwVZeP+XQx28PAaEZ3y6sQEt6rL06ddpSdoTMp -BnCqTbxW+eWMyjkIn6t9GBtUV45yB1EkHNnj2Ex4GwCiN9T84QQjKSr+8f0psGrZ -vPbCbQAwNFJjisLixnjlGPLKa5vOmNwIh/LAyUW5DjpkCx004LPDuqPpFsKXNKpa -L2Dm6uc0x4Jo5m+gUTVORB6hOSzWnWDj2GWfomLzzyjG81DRGFBpco/O93zecsIN -3SL2Ysjpq1zdoS01CMYxie//9zWvYwzI25/OZigtnpCIrcd2j1Y6dMUFQAzAtHE+ -qsXflSL8HIS+IJEFIQobLlYhHkoE3avgNx5jlu+OLYe0dF0Ykx1PGNjbwqvTX37R -Cn32NMjlotW2QcGEZhDKj+3urZizp5xdTPZitA+aEjZM/Ni71VOdiOP0igbw6asZ -2fxdozZ1TnSSYNYvNATwthNmZysCAwEAAaOCAeUwggHhMBIGA1UdEwEB/wQIMAYB -Af8CAQAwDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTR4XENCy2BTm6KSo9MI7NM -XqtpCzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzCBxwYIKwYBBQUH -AQEEgbowgbcwOwYIKwYBBQUHMAKGL2h0dHA6Ly9yb3N0ZWxlY29tLnJ1L2NkcC9y -b290Y2Ffc3NsX3JzYTIwMjIuY3J0MDsGCCsGAQUFBzAChi9odHRwOi8vY29tcGFu -eS5ydC5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNydDA7BggrBgEFBQcwAoYv -aHR0cDovL3JlZXN0ci1wa2kucnUvY2RwL3Jvb3RjYV9zc2xfcnNhMjAyMi5jcnQw -gbAGA1UdHwSBqDCBpTA1oDOgMYYvaHR0cDovL3Jvc3RlbGVjb20ucnUvY2RwL3Jv -b3RjYV9zc2xfcnNhMjAyMi5jcmwwNaAzoDGGL2h0dHA6Ly9jb21wYW55LnJ0LnJ1 -L2NkcC9yb290Y2Ffc3NsX3JzYTIwMjIuY3JsMDWgM6Axhi9odHRwOi8vcmVlc3Ry -LXBraS5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNybDANBgkqhkiG9w0BAQsF -AAOCAgEARBVzZls79AdiSCpar15dA5Hr/rrT4WbrOfzlpI+xrLeRPrUG6eUWIW4v -Sui1yx3iqGLCjPcKb+HOTwoRMbI6ytP/ndp3TlYua2advYBEhSvjs+4vDZNwXr/D -anbwIWdurZmViQRBDFebpkvnIvru/RpWud/5r624Wp8voZMRtj/cm6aI9LtvBfT9 -cfzhOaexI/99c14dyiuk1+6QhdwKaCRTc1mdfNQmnfWNRbfWhWBlK3h4GGE9JK33 -Gk8ZS8DMrkdAh0xby4xAQ/mSWAfWrBmfzlOqGyoB1U47WTOeqNbWkkoAP2ys94+s -Jg4NTkiDVtXRF6nr6fYi0bSOvOFg0IQrMXO2Y8gyg9ARdPJwKtvWX8VPADCYMiWH -h4n8bZokIrImVKLDQKHY4jCsND2HHdJfnrdL2YJw1qFskNO4cSNmZydw0Wkgjv9k -F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F -E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe -GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p -ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/develop/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/develop/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/develop/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/develop/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk11/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk11/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk16/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk16/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk17/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk17/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk18/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk18/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk19/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk19/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk20/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk20/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk21/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk21/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk22/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk22/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk6/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk6/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk7/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk7/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk8/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/jdk8/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/main/.env b/linux/ecosystem/epicmorg/debian/11-bullseye/main/.env deleted file mode 100644 index f0362f875..000000000 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/main/.env +++ /dev/null @@ -1,29 +0,0 @@ -################################################################## -# perforce client binary -################################################################## -P4_VERSION=r23.2 -P4_DOWNLOAD_URL=https://filehost.perforce.com/perforce/${P4_VERSION}/bin.linux26x86_64/p4 - -################################################################## -# 7z official binary -################################################################## -SZ_VERSION=7z2407 -SZ_DOWNLOAD_URL=https://www.7-zip.org/a/${SZ_VERSION}-linux-x64.tar.xz - -################################################################## -# LazyGit official binary -################################################################## -LAZYGIT_VERSION=0.42.0 -LAZYGIT_DOWNLOAD_URL=https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz - -################################################################## -# dumb init -################################################################## -DUMB_INIT_VERSION=1.2.5 -DUMB_INIT_DOWNLOAD_URL=https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_x86_64 - -################################################################## -# gosu -################################################################## -GOSU_VER=1.17 -GOSU_DOWNLOAD_URL=https://github.com/tianon/gosu/releases/download/${GOSU_VER}/gosu-amd64 diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/main/docker-compose.yml b/linux/ecosystem/epicmorg/debian/11-bullseye/main/docker-compose.yml index 34442e899..ba0e93a58 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/main/docker-compose.yml +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/main/docker-compose.yml @@ -4,14 +4,3 @@ services: image: "epicmorg/debian:bullseye" build: context: . - args: - P4_#version: ${P4_VERSION} - P4_DOWNLOAD_URL: ${P4_DOWNLOAD_URL} - SZ_#version: ${SZ_VERSION} - SZ_DOWNLOAD_URL: ${SZ_DOWNLOAD_URL} - LAZYGIT_#version: ${LAZYGIT_VERSION} - LAZYGIT_DOWNLOAD_URL: ${LAZYGIT_DOWNLOAD_URL} - DUMB_INIT_#version: ${DUMB_INIT_VERSION} - DUMB_INIT_DOWNLOAD_URL: ${DUMB_INIT_DOWNLOAD_URL} - GOSU_VER: ${GOSU_VER} - GOSU_DOWNLOAD_URL: ${GOSU_DOWNLOAD_URL} diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/main/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/main/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/slim/kaniko-build.py b/linux/ecosystem/epicmorg/debian/11-bullseye/slim/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/slim/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/slim/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt b/linux/ecosystem/epicmorg/debian/11-bullseye/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt index 09adbab6c..4c143a21f 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -31,38 +30,4 @@ WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq 391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= -======= ------BEGIN CERTIFICATE----- -MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAxMjEwNDE1WhcNMzIwMjI3MjEwNDE1WjBwMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMSAwHgYDVQQDDBdSdXNzaWFuIFRydXN0ZWQgUm9v -dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMfFOZ8pUAL3+r2n -qqE0Zp52selXsKGFYoG0GM5bwz1bSFtCt+AZQMhkWQheI3poZAToYJu69pHLKS6Q -XBiwBC1cvzYmUYKMYZC7jE5YhEU2bSL0mX7NaMxMDmH2/NwuOVRj8OImVa5s1F4U -zn4Kv3PFlDBjjSjXKVY9kmjUBsXQrIHeaqmUIsPIlNWUnimXS0I0abExqkbdrXbX -YwCOXhOO2pDUx3ckmJlCMUGacUTnylyQW2VsJIyIGA8V0xzdaeUXg0VZ6ZmNUr5Y -Ber/EAOLPb8NYpsAhJe2mXjMB/J9HNsoFMBFJ0lLOT/+dQvjbdRZoOT8eqJpWnVD -U+QL/qEZnz57N88OWM3rabJkRNdU/Z7x5SFIM9FrqtN8xewsiBWBI0K6XFuOBOTD -4V08o4TzJ8+Ccq5XlCUW2L48pZNCYuBDfBh7FxkB7qDgGDiaftEkZZfApRg2E+M9 -G8wkNKTPLDc4wH0FDTijhgxR3Y4PiS1HL2Zhw7bD3CbslmEGgfnnZojNkJtcLeBH -BLa52/dSwNU4WWLubaYSiAmA9IUMX1/RpfpxOxd4Ykmhz97oFbUaDJFipIggx5sX -ePAlkTdWnv+RWBxlJwMQ25oEHmRguNYf4Zr/Rxr9cS93Y+mdXIZaBEE0KS2iLRqa -OiWBki9IMQU4phqPOBAaG7A+eP8PAgMBAAGjZjBkMB0GA1UdDgQWBBTh0YHlzlpf -BKrS6badZrHF+qwshzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzAS -BgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF -AAOCAgEAALIY1wkilt/urfEVM5vKzr6utOeDWCUczmWX/RX4ljpRdgF+5fAIS4vH -tmXkqpSCOVeWUrJV9QvZn6L227ZwuE15cWi8DCDal3Ue90WgAJJZMfTshN4OI8cq -W9E4EG9wglbEtMnObHlms8F3CHmrw3k6KmUkWGoa+/ENmcVl68u/cMRl1JbW2bM+ -/3A+SAg2c6iPDlehczKx2oa95QW0SkPPWGuNA/CE8CpyANIhu9XFrj3RQ3EqeRcS -AQQod1RNuHpfETLU/A2gMmvn/w/sx7TB3W5BPs6rprOA37tutPq9u6FTZOcG1Oqj -C/B7yTqgI7rbyvox7DEXoX7rIiEqyNNUguTk/u3SZ4VXE2kmxdmSh3TQvybfbnXV -4JbCZVaqiZraqc7oZMnRoWrXRG3ztbnbes/9qhRGI7PqXqeKJBztxRTEVj8ONs1d -WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ -D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC -EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq -391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt b/linux/ecosystem/epicmorg/debian/11-bullseye/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt index e50b7d624..2e3f8285d 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -39,46 +38,4 @@ F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= -======= ------BEGIN CERTIFICATE----- -MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAyMTEyNTE5WhcNMjcwMzA2MTEyNTE5WjBvMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMR8wHQYDVQQDDBZSdXNzaWFuIFRydXN0ZWQgU3Vi -IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9YPqBKOk19NFymrE -wehzrhBEgT2atLezpduB24mQ7CiOa/HVpFCDRZzdxqlh8drku408/tTmWzlNH/br -HuQhZ/miWKOf35lpKzjyBd6TPM23uAfJvEOQ2/dnKGGJbsUo1/udKSvxQwVHpVv3 -S80OlluKfhWPDEXQpgyFqIzPoxIQTLZ0deirZwMVHarZ5u8HqHetRuAtmO2ZDGQn -vVOJYAjls+Hiueq7Lj7Oce7CQsTwVZeP+XQx28PAaEZ3y6sQEt6rL06ddpSdoTMp -BnCqTbxW+eWMyjkIn6t9GBtUV45yB1EkHNnj2Ex4GwCiN9T84QQjKSr+8f0psGrZ -vPbCbQAwNFJjisLixnjlGPLKa5vOmNwIh/LAyUW5DjpkCx004LPDuqPpFsKXNKpa -L2Dm6uc0x4Jo5m+gUTVORB6hOSzWnWDj2GWfomLzzyjG81DRGFBpco/O93zecsIN -3SL2Ysjpq1zdoS01CMYxie//9zWvYwzI25/OZigtnpCIrcd2j1Y6dMUFQAzAtHE+ -qsXflSL8HIS+IJEFIQobLlYhHkoE3avgNx5jlu+OLYe0dF0Ykx1PGNjbwqvTX37R -Cn32NMjlotW2QcGEZhDKj+3urZizp5xdTPZitA+aEjZM/Ni71VOdiOP0igbw6asZ -2fxdozZ1TnSSYNYvNATwthNmZysCAwEAAaOCAeUwggHhMBIGA1UdEwEB/wQIMAYB -Af8CAQAwDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTR4XENCy2BTm6KSo9MI7NM -XqtpCzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzCBxwYIKwYBBQUH -AQEEgbowgbcwOwYIKwYBBQUHMAKGL2h0dHA6Ly9yb3N0ZWxlY29tLnJ1L2NkcC9y -b290Y2Ffc3NsX3JzYTIwMjIuY3J0MDsGCCsGAQUFBzAChi9odHRwOi8vY29tcGFu -eS5ydC5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNydDA7BggrBgEFBQcwAoYv -aHR0cDovL3JlZXN0ci1wa2kucnUvY2RwL3Jvb3RjYV9zc2xfcnNhMjAyMi5jcnQw -gbAGA1UdHwSBqDCBpTA1oDOgMYYvaHR0cDovL3Jvc3RlbGVjb20ucnUvY2RwL3Jv -b3RjYV9zc2xfcnNhMjAyMi5jcmwwNaAzoDGGL2h0dHA6Ly9jb21wYW55LnJ0LnJ1 -L2NkcC9yb290Y2Ffc3NsX3JzYTIwMjIuY3JsMDWgM6Axhi9odHRwOi8vcmVlc3Ry -LXBraS5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNybDANBgkqhkiG9w0BAQsF -AAOCAgEARBVzZls79AdiSCpar15dA5Hr/rrT4WbrOfzlpI+xrLeRPrUG6eUWIW4v -Sui1yx3iqGLCjPcKb+HOTwoRMbI6ytP/ndp3TlYua2advYBEhSvjs+4vDZNwXr/D -anbwIWdurZmViQRBDFebpkvnIvru/RpWud/5r624Wp8voZMRtj/cm6aI9LtvBfT9 -cfzhOaexI/99c14dyiuk1+6QhdwKaCRTc1mdfNQmnfWNRbfWhWBlK3h4GGE9JK33 -Gk8ZS8DMrkdAh0xby4xAQ/mSWAfWrBmfzlOqGyoB1U47WTOeqNbWkkoAP2ys94+s -Jg4NTkiDVtXRF6nr6fYi0bSOvOFg0IQrMXO2Y8gyg9ARdPJwKtvWX8VPADCYMiWH -h4n8bZokIrImVKLDQKHY4jCsND2HHdJfnrdL2YJw1qFskNO4cSNmZydw0Wkgjv9k -F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F -E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe -GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p -ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/develop/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/develop/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/develop/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/develop/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk11/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk11/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk16/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk16/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk17/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk17/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk18/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk18/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk19/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk19/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk20/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk20/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk21/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk21/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk22/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk22/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk6/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk6/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk7/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk7/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk8/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/jdk8/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/main/.env b/linux/ecosystem/epicmorg/debian/12-bookworm/main/.env deleted file mode 100644 index f0362f875..000000000 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/main/.env +++ /dev/null @@ -1,29 +0,0 @@ -################################################################## -# perforce client binary -################################################################## -P4_VERSION=r23.2 -P4_DOWNLOAD_URL=https://filehost.perforce.com/perforce/${P4_VERSION}/bin.linux26x86_64/p4 - -################################################################## -# 7z official binary -################################################################## -SZ_VERSION=7z2407 -SZ_DOWNLOAD_URL=https://www.7-zip.org/a/${SZ_VERSION}-linux-x64.tar.xz - -################################################################## -# LazyGit official binary -################################################################## -LAZYGIT_VERSION=0.42.0 -LAZYGIT_DOWNLOAD_URL=https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz - -################################################################## -# dumb init -################################################################## -DUMB_INIT_VERSION=1.2.5 -DUMB_INIT_DOWNLOAD_URL=https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_x86_64 - -################################################################## -# gosu -################################################################## -GOSU_VER=1.17 -GOSU_DOWNLOAD_URL=https://github.com/tianon/gosu/releases/download/${GOSU_VER}/gosu-amd64 diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/main/docker-compose.yml b/linux/ecosystem/epicmorg/debian/12-bookworm/main/docker-compose.yml index 43c091bd3..3ded23662 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/main/docker-compose.yml +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/main/docker-compose.yml @@ -4,14 +4,3 @@ services: image: "epicmorg/debian:bookworm" build: context: . - args: - P4_#version: ${P4_VERSION} - P4_DOWNLOAD_URL: ${P4_DOWNLOAD_URL} - SZ_#version: ${SZ_VERSION} - SZ_DOWNLOAD_URL: ${SZ_DOWNLOAD_URL} - LAZYGIT_#version: ${LAZYGIT_VERSION} - LAZYGIT_DOWNLOAD_URL: ${LAZYGIT_DOWNLOAD_URL} - DUMB_INIT_#version: ${DUMB_INIT_VERSION} - DUMB_INIT_DOWNLOAD_URL: ${DUMB_INIT_DOWNLOAD_URL} - GOSU_VER: ${GOSU_VER} - GOSU_DOWNLOAD_URL: ${GOSU_DOWNLOAD_URL} diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/main/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/main/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/slim/kaniko-build.py b/linux/ecosystem/epicmorg/debian/12-bookworm/slim/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/slim/kaniko-build.py +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/slim/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt b/linux/ecosystem/epicmorg/debian/12-bookworm/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt index 09adbab6c..4c143a21f 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/slim/usr/local/share/ca-certificates/russian_trusted_root_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -31,38 +30,4 @@ WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq 391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= -======= ------BEGIN CERTIFICATE----- -MIIFwjCCA6qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAxMjEwNDE1WhcNMzIwMjI3MjEwNDE1WjBwMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMSAwHgYDVQQDDBdSdXNzaWFuIFRydXN0ZWQgUm9v -dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMfFOZ8pUAL3+r2n -qqE0Zp52selXsKGFYoG0GM5bwz1bSFtCt+AZQMhkWQheI3poZAToYJu69pHLKS6Q -XBiwBC1cvzYmUYKMYZC7jE5YhEU2bSL0mX7NaMxMDmH2/NwuOVRj8OImVa5s1F4U -zn4Kv3PFlDBjjSjXKVY9kmjUBsXQrIHeaqmUIsPIlNWUnimXS0I0abExqkbdrXbX -YwCOXhOO2pDUx3ckmJlCMUGacUTnylyQW2VsJIyIGA8V0xzdaeUXg0VZ6ZmNUr5Y -Ber/EAOLPb8NYpsAhJe2mXjMB/J9HNsoFMBFJ0lLOT/+dQvjbdRZoOT8eqJpWnVD -U+QL/qEZnz57N88OWM3rabJkRNdU/Z7x5SFIM9FrqtN8xewsiBWBI0K6XFuOBOTD -4V08o4TzJ8+Ccq5XlCUW2L48pZNCYuBDfBh7FxkB7qDgGDiaftEkZZfApRg2E+M9 -G8wkNKTPLDc4wH0FDTijhgxR3Y4PiS1HL2Zhw7bD3CbslmEGgfnnZojNkJtcLeBH -BLa52/dSwNU4WWLubaYSiAmA9IUMX1/RpfpxOxd4Ykmhz97oFbUaDJFipIggx5sX -ePAlkTdWnv+RWBxlJwMQ25oEHmRguNYf4Zr/Rxr9cS93Y+mdXIZaBEE0KS2iLRqa -OiWBki9IMQU4phqPOBAaG7A+eP8PAgMBAAGjZjBkMB0GA1UdDgQWBBTh0YHlzlpf -BKrS6badZrHF+qwshzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzAS -BgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF -AAOCAgEAALIY1wkilt/urfEVM5vKzr6utOeDWCUczmWX/RX4ljpRdgF+5fAIS4vH -tmXkqpSCOVeWUrJV9QvZn6L227ZwuE15cWi8DCDal3Ue90WgAJJZMfTshN4OI8cq -W9E4EG9wglbEtMnObHlms8F3CHmrw3k6KmUkWGoa+/ENmcVl68u/cMRl1JbW2bM+ -/3A+SAg2c6iPDlehczKx2oa95QW0SkPPWGuNA/CE8CpyANIhu9XFrj3RQ3EqeRcS -AQQod1RNuHpfETLU/A2gMmvn/w/sx7TB3W5BPs6rprOA37tutPq9u6FTZOcG1Oqj -C/B7yTqgI7rbyvox7DEXoX7rIiEqyNNUguTk/u3SZ4VXE2kmxdmSh3TQvybfbnXV -4JbCZVaqiZraqc7oZMnRoWrXRG3ztbnbes/9qhRGI7PqXqeKJBztxRTEVj8ONs1d -WN5szTwaPIvhkhO3CO5ErU2rVdUr89wKpNXbBODFKRtgxUT70YpmJ46VVaqdAhOZ -D9EUUn4YaeLaS8AjSF/h7UkjOibNc4qVDiPP+rkehFWM66PVnP1Msh93tc+taIfC -EYVMxjh8zNbFuoc7fzvvrFILLe7ifvEIUqSVIC/AzplM/Jxw7buXFeGP1qVCBEHq -391d/9RAfaZ12zkwFsl+IKwE/OZxW8AHa9i1p4GO0YSNuczzEm4= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt b/linux/ecosystem/epicmorg/debian/12-bookworm/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt index e50b7d624..2e3f8285d 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/slim/usr/local/share/ca-certificates/russian_trusted_sub_ca_pem.crt @@ -1,4 +1,3 @@ -<<<<<<< HEAD -----BEGIN CERTIFICATE----- MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu @@ -39,46 +38,4 @@ F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= -======= ------BEGIN CERTIFICATE----- -MIIHQjCCBSqgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCUlUx -PzA9BgNVBAoMNlRoZSBNaW5pc3RyeSBvZiBEaWdpdGFsIERldmVsb3BtZW50IGFu -ZCBDb21tdW5pY2F0aW9uczEgMB4GA1UEAwwXUnVzc2lhbiBUcnVzdGVkIFJvb3Qg -Q0EwHhcNMjIwMzAyMTEyNTE5WhcNMjcwMzA2MTEyNTE5WjBvMQswCQYDVQQGEwJS -VTE/MD0GA1UECgw2VGhlIE1pbmlzdHJ5IG9mIERpZ2l0YWwgRGV2ZWxvcG1lbnQg -YW5kIENvbW11bmljYXRpb25zMR8wHQYDVQQDDBZSdXNzaWFuIFRydXN0ZWQgU3Vi -IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9YPqBKOk19NFymrE -wehzrhBEgT2atLezpduB24mQ7CiOa/HVpFCDRZzdxqlh8drku408/tTmWzlNH/br -HuQhZ/miWKOf35lpKzjyBd6TPM23uAfJvEOQ2/dnKGGJbsUo1/udKSvxQwVHpVv3 -S80OlluKfhWPDEXQpgyFqIzPoxIQTLZ0deirZwMVHarZ5u8HqHetRuAtmO2ZDGQn -vVOJYAjls+Hiueq7Lj7Oce7CQsTwVZeP+XQx28PAaEZ3y6sQEt6rL06ddpSdoTMp -BnCqTbxW+eWMyjkIn6t9GBtUV45yB1EkHNnj2Ex4GwCiN9T84QQjKSr+8f0psGrZ -vPbCbQAwNFJjisLixnjlGPLKa5vOmNwIh/LAyUW5DjpkCx004LPDuqPpFsKXNKpa -L2Dm6uc0x4Jo5m+gUTVORB6hOSzWnWDj2GWfomLzzyjG81DRGFBpco/O93zecsIN -3SL2Ysjpq1zdoS01CMYxie//9zWvYwzI25/OZigtnpCIrcd2j1Y6dMUFQAzAtHE+ -qsXflSL8HIS+IJEFIQobLlYhHkoE3avgNx5jlu+OLYe0dF0Ykx1PGNjbwqvTX37R -Cn32NMjlotW2QcGEZhDKj+3urZizp5xdTPZitA+aEjZM/Ni71VOdiOP0igbw6asZ -2fxdozZ1TnSSYNYvNATwthNmZysCAwEAAaOCAeUwggHhMBIGA1UdEwEB/wQIMAYB -Af8CAQAwDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTR4XENCy2BTm6KSo9MI7NM -XqtpCzAfBgNVHSMEGDAWgBTh0YHlzlpfBKrS6badZrHF+qwshzCBxwYIKwYBBQUH -AQEEgbowgbcwOwYIKwYBBQUHMAKGL2h0dHA6Ly9yb3N0ZWxlY29tLnJ1L2NkcC9y -b290Y2Ffc3NsX3JzYTIwMjIuY3J0MDsGCCsGAQUFBzAChi9odHRwOi8vY29tcGFu -eS5ydC5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNydDA7BggrBgEFBQcwAoYv -aHR0cDovL3JlZXN0ci1wa2kucnUvY2RwL3Jvb3RjYV9zc2xfcnNhMjAyMi5jcnQw -gbAGA1UdHwSBqDCBpTA1oDOgMYYvaHR0cDovL3Jvc3RlbGVjb20ucnUvY2RwL3Jv -b3RjYV9zc2xfcnNhMjAyMi5jcmwwNaAzoDGGL2h0dHA6Ly9jb21wYW55LnJ0LnJ1 -L2NkcC9yb290Y2Ffc3NsX3JzYTIwMjIuY3JsMDWgM6Axhi9odHRwOi8vcmVlc3Ry -LXBraS5ydS9jZHAvcm9vdGNhX3NzbF9yc2EyMDIyLmNybDANBgkqhkiG9w0BAQsF -AAOCAgEARBVzZls79AdiSCpar15dA5Hr/rrT4WbrOfzlpI+xrLeRPrUG6eUWIW4v -Sui1yx3iqGLCjPcKb+HOTwoRMbI6ytP/ndp3TlYua2advYBEhSvjs+4vDZNwXr/D -anbwIWdurZmViQRBDFebpkvnIvru/RpWud/5r624Wp8voZMRtj/cm6aI9LtvBfT9 -cfzhOaexI/99c14dyiuk1+6QhdwKaCRTc1mdfNQmnfWNRbfWhWBlK3h4GGE9JK33 -Gk8ZS8DMrkdAh0xby4xAQ/mSWAfWrBmfzlOqGyoB1U47WTOeqNbWkkoAP2ys94+s -Jg4NTkiDVtXRF6nr6fYi0bSOvOFg0IQrMXO2Y8gyg9ARdPJwKtvWX8VPADCYMiWH -h4n8bZokIrImVKLDQKHY4jCsND2HHdJfnrdL2YJw1qFskNO4cSNmZydw0Wkgjv9k -F+KxqrDKlB8MZu2Hclph6v/CZ0fQ9YuE8/lsHZ0Qc2HyiSMnvjgK5fDc3TD4fa8F -E8gMNurM+kV8PT8LNIM+4Zs+LKEV8nqRWBaxkIVJGekkVKO8xDBOG/aN62AZKHOe -GcyIdu7yNMMRihGVZCYr8rYiJoKiOzDqOkPkLOPdhtVlgnhowzHDxMHND/E2WA5p -ZHuNM/m0TXt2wTTPL7JH2YC0gPz/BvvSzjksgzU5rLbRyUKQkgU= ->>>>>>> develop -----END CERTIFICATE----- \ No newline at end of file diff --git a/linux/ecosystem/gitlab/runner/amxx-sdk/1.10/kaniko-build.py b/linux/ecosystem/gitlab/runner/amxx-sdk/1.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/amxx-sdk/1.10/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/amxx-sdk/1.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/amxx-sdk/1.9/kaniko-build.py b/linux/ecosystem/gitlab/runner/amxx-sdk/1.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/amxx-sdk/1.9/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/amxx-sdk/1.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/android-sdk/jdk11/kaniko-build.py b/linux/ecosystem/gitlab/runner/android-sdk/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/android-sdk/jdk11/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/android-sdk/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/android-sdk/jdk17/kaniko-build.py b/linux/ecosystem/gitlab/runner/android-sdk/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/android-sdk/jdk17/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/android-sdk/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/android-sdk/jdk8/kaniko-build.py b/linux/ecosystem/gitlab/runner/android-sdk/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/android-sdk/jdk8/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/android-sdk/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/atlassian-sdk/kaniko-build.py b/linux/ecosystem/gitlab/runner/atlassian-sdk/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/atlassian-sdk/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/atlassian-sdk/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/dotnet-sdk/kaniko-build.py b/linux/ecosystem/gitlab/runner/dotnet-sdk/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/dotnet-sdk/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/dotnet-sdk/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/latest/kaniko-build.py b/linux/ecosystem/gitlab/runner/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/latest/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/latest/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node0.12/kaniko-build.py b/linux/ecosystem/gitlab/runner/node0.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node0.12/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node0.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node10/kaniko-build.py b/linux/ecosystem/gitlab/runner/node10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node10/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node11/kaniko-build.py b/linux/ecosystem/gitlab/runner/node11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node11/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node12/kaniko-build.py b/linux/ecosystem/gitlab/runner/node12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node12/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node13/kaniko-build.py b/linux/ecosystem/gitlab/runner/node13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node13/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node14/kaniko-build.py b/linux/ecosystem/gitlab/runner/node14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node14/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node15/kaniko-build.py b/linux/ecosystem/gitlab/runner/node15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node15/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node16/kaniko-build.py b/linux/ecosystem/gitlab/runner/node16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node16/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node17/kaniko-build.py b/linux/ecosystem/gitlab/runner/node17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node17/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node18/kaniko-build.py b/linux/ecosystem/gitlab/runner/node18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node18/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node19/kaniko-build.py b/linux/ecosystem/gitlab/runner/node19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node19/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node20/kaniko-build.py b/linux/ecosystem/gitlab/runner/node20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node20/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node21/kaniko-build.py b/linux/ecosystem/gitlab/runner/node21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node21/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node22/kaniko-build.py b/linux/ecosystem/gitlab/runner/node22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node22/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node4/kaniko-build.py b/linux/ecosystem/gitlab/runner/node4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node4/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node5/kaniko-build.py b/linux/ecosystem/gitlab/runner/node5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node5/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node6/kaniko-build.py b/linux/ecosystem/gitlab/runner/node6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node6/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node7/kaniko-build.py b/linux/ecosystem/gitlab/runner/node7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node7/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node8/kaniko-build.py b/linux/ecosystem/gitlab/runner/node8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node8/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/node9/kaniko-build.py b/linux/ecosystem/gitlab/runner/node9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/node9/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/node9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/php7.2/kaniko-build.py b/linux/ecosystem/gitlab/runner/php7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/php7.2/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/php7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/php7.3/kaniko-build.py b/linux/ecosystem/gitlab/runner/php7.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/php7.3/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/php7.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/php7.4/kaniko-build.py b/linux/ecosystem/gitlab/runner/php7.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/php7.4/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/php7.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/php8.0/kaniko-build.py b/linux/ecosystem/gitlab/runner/php8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/php8.0/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/php8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/php8.1/kaniko-build.py b/linux/ecosystem/gitlab/runner/php8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/php8.1/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/php8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/php8.2/kaniko-build.py b/linux/ecosystem/gitlab/runner/php8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/php8.2/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/php8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/php8.3/kaniko-build.py b/linux/ecosystem/gitlab/runner/php8.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/php8.3/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/php8.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/gitlab/runner/steam-sdk/kaniko-build.py b/linux/ecosystem/gitlab/runner/steam-sdk/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/gitlab/runner/steam-sdk/kaniko-build.py +++ b/linux/ecosystem/gitlab/runner/steam-sdk/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/monero/monerod/kaniko-build.py b/linux/ecosystem/monero/monerod/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/monero/monerod/kaniko-build.py +++ b/linux/ecosystem/monero/monerod/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/monero/p2pool/kaniko-build.py b/linux/ecosystem/monero/p2pool/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/monero/p2pool/kaniko-build.py +++ b/linux/ecosystem/monero/p2pool/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.14.2/main/kaniko-build.py b/linux/ecosystem/nginx/1.14.2/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.14.2/main/kaniko-build.py +++ b/linux/ecosystem/nginx/1.14.2/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.14.2/php/kaniko-build.py b/linux/ecosystem/nginx/1.14.2/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.14.2/php/kaniko-build.py +++ b/linux/ecosystem/nginx/1.14.2/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.14.2/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/1.14.2/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.14.2/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/1.14.2/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.15.12/main/kaniko-build.py b/linux/ecosystem/nginx/1.15.12/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.15.12/main/kaniko-build.py +++ b/linux/ecosystem/nginx/1.15.12/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.15.12/php/kaniko-build.py b/linux/ecosystem/nginx/1.15.12/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.15.12/php/kaniko-build.py +++ b/linux/ecosystem/nginx/1.15.12/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.15.12/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/1.15.12/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.15.12/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/1.15.12/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.16.1/main/kaniko-build.py b/linux/ecosystem/nginx/1.16.1/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.16.1/main/kaniko-build.py +++ b/linux/ecosystem/nginx/1.16.1/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.16.1/php/kaniko-build.py b/linux/ecosystem/nginx/1.16.1/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.16.1/php/kaniko-build.py +++ b/linux/ecosystem/nginx/1.16.1/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.16.1/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/1.16.1/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.16.1/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/1.16.1/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.17.10/main/kaniko-build.py b/linux/ecosystem/nginx/1.17.10/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.17.10/main/kaniko-build.py +++ b/linux/ecosystem/nginx/1.17.10/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.17.10/php/kaniko-build.py b/linux/ecosystem/nginx/1.17.10/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.17.10/php/kaniko-build.py +++ b/linux/ecosystem/nginx/1.17.10/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.17.10/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/1.17.10/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.17.10/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/1.17.10/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.18.0/main/kaniko-build.py b/linux/ecosystem/nginx/1.18.0/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.18.0/main/kaniko-build.py +++ b/linux/ecosystem/nginx/1.18.0/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.18.0/php/kaniko-build.py b/linux/ecosystem/nginx/1.18.0/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.18.0/php/kaniko-build.py +++ b/linux/ecosystem/nginx/1.18.0/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.18.0/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/1.18.0/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.18.0/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/1.18.0/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.19.10/main/kaniko-build.py b/linux/ecosystem/nginx/1.19.10/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.19.10/main/kaniko-build.py +++ b/linux/ecosystem/nginx/1.19.10/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.19.10/php/kaniko-build.py b/linux/ecosystem/nginx/1.19.10/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.19.10/php/kaniko-build.py +++ b/linux/ecosystem/nginx/1.19.10/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.19.10/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/1.19.10/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.19.10/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/1.19.10/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.20.1/main/kaniko-build.py b/linux/ecosystem/nginx/1.20.1/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.20.1/main/kaniko-build.py +++ b/linux/ecosystem/nginx/1.20.1/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.20.1/php/kaniko-build.py b/linux/ecosystem/nginx/1.20.1/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.20.1/php/kaniko-build.py +++ b/linux/ecosystem/nginx/1.20.1/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.20.1/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/1.20.1/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.20.1/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/1.20.1/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.21.3/main/kaniko-build.py b/linux/ecosystem/nginx/1.21.3/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.21.3/main/kaniko-build.py +++ b/linux/ecosystem/nginx/1.21.3/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.21.3/php/kaniko-build.py b/linux/ecosystem/nginx/1.21.3/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.21.3/php/kaniko-build.py +++ b/linux/ecosystem/nginx/1.21.3/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.21.3/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/1.21.3/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.21.3/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/1.21.3/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.21.6/main/kaniko-build.py b/linux/ecosystem/nginx/1.21.6/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.21.6/main/kaniko-build.py +++ b/linux/ecosystem/nginx/1.21.6/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.21.6/php/kaniko-build.py b/linux/ecosystem/nginx/1.21.6/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.21.6/php/kaniko-build.py +++ b/linux/ecosystem/nginx/1.21.6/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/1.21.6/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/1.21.6/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/1.21.6/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/1.21.6/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/latest/mainline/main/kaniko-build.py b/linux/ecosystem/nginx/latest/mainline/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/latest/mainline/main/kaniko-build.py +++ b/linux/ecosystem/nginx/latest/mainline/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/latest/mainline/php/kaniko-build.py b/linux/ecosystem/nginx/latest/mainline/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/latest/mainline/php/kaniko-build.py +++ b/linux/ecosystem/nginx/latest/mainline/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/latest/mainline/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/latest/mainline/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/latest/mainline/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/latest/mainline/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/latest/quic/main/kaniko-build.py b/linux/ecosystem/nginx/latest/quic/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/latest/quic/main/kaniko-build.py +++ b/linux/ecosystem/nginx/latest/quic/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/latest/quic/php/kaniko-build.py b/linux/ecosystem/nginx/latest/quic/php/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/latest/quic/php/kaniko-build.py +++ b/linux/ecosystem/nginx/latest/quic/php/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nginx/latest/quic/rtmp-hls/kaniko-build.py b/linux/ecosystem/nginx/latest/quic/rtmp-hls/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nginx/latest/quic/rtmp-hls/kaniko-build.py +++ b/linux/ecosystem/nginx/latest/quic/rtmp-hls/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/ninjam/latest/kaniko-build.py b/linux/ecosystem/ninjam/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/ninjam/latest/kaniko-build.py +++ b/linux/ecosystem/ninjam/latest/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/current/kaniko-build.py b/linux/ecosystem/nodejs/current/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/current/kaniko-build.py +++ b/linux/ecosystem/nodejs/current/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/lts/kaniko-build.py b/linux/ecosystem/nodejs/lts/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/lts/kaniko-build.py +++ b/linux/ecosystem/nodejs/lts/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node0.12/kaniko-build.py b/linux/ecosystem/nodejs/node0.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node0.12/kaniko-build.py +++ b/linux/ecosystem/nodejs/node0.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node10/kaniko-build.py b/linux/ecosystem/nodejs/node10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node10/kaniko-build.py +++ b/linux/ecosystem/nodejs/node10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node11/kaniko-build.py b/linux/ecosystem/nodejs/node11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node11/kaniko-build.py +++ b/linux/ecosystem/nodejs/node11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node12/kaniko-build.py b/linux/ecosystem/nodejs/node12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node12/kaniko-build.py +++ b/linux/ecosystem/nodejs/node12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node13/kaniko-build.py b/linux/ecosystem/nodejs/node13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node13/kaniko-build.py +++ b/linux/ecosystem/nodejs/node13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node14/kaniko-build.py b/linux/ecosystem/nodejs/node14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node14/kaniko-build.py +++ b/linux/ecosystem/nodejs/node14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node15/kaniko-build.py b/linux/ecosystem/nodejs/node15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node15/kaniko-build.py +++ b/linux/ecosystem/nodejs/node15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node16/kaniko-build.py b/linux/ecosystem/nodejs/node16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node16/kaniko-build.py +++ b/linux/ecosystem/nodejs/node16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node17/kaniko-build.py b/linux/ecosystem/nodejs/node17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node17/kaniko-build.py +++ b/linux/ecosystem/nodejs/node17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node18/kaniko-build.py b/linux/ecosystem/nodejs/node18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node18/kaniko-build.py +++ b/linux/ecosystem/nodejs/node18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node19/kaniko-build.py b/linux/ecosystem/nodejs/node19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node19/kaniko-build.py +++ b/linux/ecosystem/nodejs/node19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node20/kaniko-build.py b/linux/ecosystem/nodejs/node20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node20/kaniko-build.py +++ b/linux/ecosystem/nodejs/node20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node21/kaniko-build.py b/linux/ecosystem/nodejs/node21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node21/kaniko-build.py +++ b/linux/ecosystem/nodejs/node21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node22/kaniko-build.py b/linux/ecosystem/nodejs/node22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node22/kaniko-build.py +++ b/linux/ecosystem/nodejs/node22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node4/kaniko-build.py b/linux/ecosystem/nodejs/node4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node4/kaniko-build.py +++ b/linux/ecosystem/nodejs/node4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node5/kaniko-build.py b/linux/ecosystem/nodejs/node5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node5/kaniko-build.py +++ b/linux/ecosystem/nodejs/node5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node6/kaniko-build.py b/linux/ecosystem/nodejs/node6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node6/kaniko-build.py +++ b/linux/ecosystem/nodejs/node6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node7/kaniko-build.py b/linux/ecosystem/nodejs/node7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node7/kaniko-build.py +++ b/linux/ecosystem/nodejs/node7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node8/kaniko-build.py b/linux/ecosystem/nodejs/node8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node8/kaniko-build.py +++ b/linux/ecosystem/nodejs/node8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/nodejs/node9/kaniko-build.py b/linux/ecosystem/nodejs/node9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/nodejs/node9/kaniko-build.py +++ b/linux/ecosystem/nodejs/node9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/opentracker/kaniko-build.py b/linux/ecosystem/opentracker/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/opentracker/kaniko-build.py +++ b/linux/ecosystem/opentracker/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r16.2/kaniko-build.py b/linux/ecosystem/perforce/base/r16.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r16.2/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r16.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r17.1/kaniko-build.py b/linux/ecosystem/perforce/base/r17.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r17.1/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r17.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r17.2/kaniko-build.py b/linux/ecosystem/perforce/base/r17.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r17.2/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r17.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r18.1/kaniko-build.py b/linux/ecosystem/perforce/base/r18.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r18.1/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r18.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r18.2/kaniko-build.py b/linux/ecosystem/perforce/base/r18.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r18.2/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r18.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r19.1/kaniko-build.py b/linux/ecosystem/perforce/base/r19.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r19.1/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r19.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r19.2/kaniko-build.py b/linux/ecosystem/perforce/base/r19.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r19.2/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r19.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r20.1/kaniko-build.py b/linux/ecosystem/perforce/base/r20.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r20.1/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r20.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r20.2/kaniko-build.py b/linux/ecosystem/perforce/base/r20.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r20.2/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r20.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r21.1/kaniko-build.py b/linux/ecosystem/perforce/base/r21.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r21.1/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r21.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r21.2/kaniko-build.py b/linux/ecosystem/perforce/base/r21.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r21.2/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r21.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r22.1/kaniko-build.py b/linux/ecosystem/perforce/base/r22.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r22.1/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r22.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r23.1/kaniko-build.py b/linux/ecosystem/perforce/base/r23.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r23.1/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r23.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/base/r23.2/kaniko-build.py b/linux/ecosystem/perforce/base/r23.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/base/r23.2/kaniko-build.py +++ b/linux/ecosystem/perforce/base/r23.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r16.2/kaniko-build.py b/linux/ecosystem/perforce/p4p/r16.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r16.2/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r16.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r17.1/kaniko-build.py b/linux/ecosystem/perforce/p4p/r17.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r17.1/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r17.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r17.2/kaniko-build.py b/linux/ecosystem/perforce/p4p/r17.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r17.2/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r17.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r18.1/kaniko-build.py b/linux/ecosystem/perforce/p4p/r18.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r18.1/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r18.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r18.2/kaniko-build.py b/linux/ecosystem/perforce/p4p/r18.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r18.2/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r18.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r19.1/kaniko-build.py b/linux/ecosystem/perforce/p4p/r19.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r19.1/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r19.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r19.2/kaniko-build.py b/linux/ecosystem/perforce/p4p/r19.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r19.2/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r19.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r20.1/kaniko-build.py b/linux/ecosystem/perforce/p4p/r20.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r20.1/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r20.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r20.2/kaniko-build.py b/linux/ecosystem/perforce/p4p/r20.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r20.2/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r20.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r21.1/kaniko-build.py b/linux/ecosystem/perforce/p4p/r21.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r21.1/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r21.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r21.2/kaniko-build.py b/linux/ecosystem/perforce/p4p/r21.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r21.2/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r21.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r22.1/kaniko-build.py b/linux/ecosystem/perforce/p4p/r22.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r22.1/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r22.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r23.1/kaniko-build.py b/linux/ecosystem/perforce/p4p/r23.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r23.1/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r23.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/perforce/p4p/r23.2/kaniko-build.py b/linux/ecosystem/perforce/p4p/r23.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/perforce/p4p/r23.2/kaniko-build.py +++ b/linux/ecosystem/perforce/p4p/r23.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/php/php5.5/kaniko-build.py b/linux/ecosystem/php/php5.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/php/php5.5/kaniko-build.py +++ b/linux/ecosystem/php/php5.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/php/php7.0/kaniko-build.py b/linux/ecosystem/php/php7.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/php/php7.0/kaniko-build.py +++ b/linux/ecosystem/php/php7.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/php/php7.1/kaniko-build.py b/linux/ecosystem/php/php7.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/php/php7.1/kaniko-build.py +++ b/linux/ecosystem/php/php7.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/php/php7.2/kaniko-build.py b/linux/ecosystem/php/php7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/php/php7.2/kaniko-build.py +++ b/linux/ecosystem/php/php7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/php/php7.3/kaniko-build.py b/linux/ecosystem/php/php7.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/php/php7.3/kaniko-build.py +++ b/linux/ecosystem/php/php7.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/php/php7.4/kaniko-build.py b/linux/ecosystem/php/php7.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/php/php7.4/kaniko-build.py +++ b/linux/ecosystem/php/php7.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/php/php8.0/kaniko-build.py b/linux/ecosystem/php/php8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/php/php8.0/kaniko-build.py +++ b/linux/ecosystem/php/php8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/php/php8.1/kaniko-build.py b/linux/ecosystem/php/php8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/php/php8.1/kaniko-build.py +++ b/linux/ecosystem/php/php8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/php/php8.2/kaniko-build.py b/linux/ecosystem/php/php8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/php/php8.2/kaniko-build.py +++ b/linux/ecosystem/php/php8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/php/php8.3/kaniko-build.py b/linux/ecosystem/php/php8.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/php/php8.3/kaniko-build.py +++ b/linux/ecosystem/php/php8.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/10/kaniko-build.py b/linux/ecosystem/postgres/10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/10/kaniko-build.py +++ b/linux/ecosystem/postgres/10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/11/kaniko-build.py b/linux/ecosystem/postgres/11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/11/kaniko-build.py +++ b/linux/ecosystem/postgres/11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/12/kaniko-build.py b/linux/ecosystem/postgres/12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/12/kaniko-build.py +++ b/linux/ecosystem/postgres/12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/13/kaniko-build.py b/linux/ecosystem/postgres/13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/13/kaniko-build.py +++ b/linux/ecosystem/postgres/13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/14/kaniko-build.py b/linux/ecosystem/postgres/14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/14/kaniko-build.py +++ b/linux/ecosystem/postgres/14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/15/kaniko-build.py b/linux/ecosystem/postgres/15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/15/kaniko-build.py +++ b/linux/ecosystem/postgres/15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/16/kaniko-build.py b/linux/ecosystem/postgres/16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/16/kaniko-build.py +++ b/linux/ecosystem/postgres/16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/8.2/kaniko-build.py b/linux/ecosystem/postgres/8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/8.2/kaniko-build.py +++ b/linux/ecosystem/postgres/8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/8.3/kaniko-build.py b/linux/ecosystem/postgres/8.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/8.3/kaniko-build.py +++ b/linux/ecosystem/postgres/8.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/8.4/kaniko-build.py b/linux/ecosystem/postgres/8.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/8.4/kaniko-build.py +++ b/linux/ecosystem/postgres/8.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/9.0/kaniko-build.py b/linux/ecosystem/postgres/9.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/9.0/kaniko-build.py +++ b/linux/ecosystem/postgres/9.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/9.1/kaniko-build.py b/linux/ecosystem/postgres/9.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/9.1/kaniko-build.py +++ b/linux/ecosystem/postgres/9.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/9.2/kaniko-build.py b/linux/ecosystem/postgres/9.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/9.2/kaniko-build.py +++ b/linux/ecosystem/postgres/9.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/9.3/kaniko-build.py b/linux/ecosystem/postgres/9.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/9.3/kaniko-build.py +++ b/linux/ecosystem/postgres/9.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/9.4/kaniko-build.py b/linux/ecosystem/postgres/9.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/9.4/kaniko-build.py +++ b/linux/ecosystem/postgres/9.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/9.5/kaniko-build.py b/linux/ecosystem/postgres/9.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/9.5/kaniko-build.py +++ b/linux/ecosystem/postgres/9.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/9.6/kaniko-build.py b/linux/ecosystem/postgres/9.6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/9.6/kaniko-build.py +++ b/linux/ecosystem/postgres/9.6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/postgres/latest/kaniko-build.py b/linux/ecosystem/postgres/latest/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/postgres/latest/kaniko-build.py +++ b/linux/ecosystem/postgres/latest/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.4.0/kaniko-build.py b/linux/ecosystem/qbittorrent/4.4.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.4.0/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.4.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.4.1/kaniko-build.py b/linux/ecosystem/qbittorrent/4.4.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.4.1/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.4.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.4.2/kaniko-build.py b/linux/ecosystem/qbittorrent/4.4.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.4.2/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.4.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.4.3.1/kaniko-build.py b/linux/ecosystem/qbittorrent/4.4.3.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.4.3.1/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.4.3.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.4.4/kaniko-build.py b/linux/ecosystem/qbittorrent/4.4.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.4.4/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.4.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.4.5/kaniko-build.py b/linux/ecosystem/qbittorrent/4.4.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.4.5/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.4.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.5.0/kaniko-build.py b/linux/ecosystem/qbittorrent/4.5.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.5.0/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.5.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.5.1/kaniko-build.py b/linux/ecosystem/qbittorrent/4.5.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.5.1/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.5.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.5.2/kaniko-build.py b/linux/ecosystem/qbittorrent/4.5.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.5.2/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.5.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.5.3/kaniko-build.py b/linux/ecosystem/qbittorrent/4.5.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.5.3/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.5.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.5.4/kaniko-build.py b/linux/ecosystem/qbittorrent/4.5.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.5.4/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.5.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.5.5/kaniko-build.py b/linux/ecosystem/qbittorrent/4.5.5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.5.5/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.5.5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.6.0/kaniko-build.py b/linux/ecosystem/qbittorrent/4.6.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.6.0/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.6.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.6.1/kaniko-build.py b/linux/ecosystem/qbittorrent/4.6.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.6.1/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.6.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.6.2/kaniko-build.py b/linux/ecosystem/qbittorrent/4.6.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.6.2/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.6.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.6.3/kaniko-build.py b/linux/ecosystem/qbittorrent/4.6.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.6.3/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.6.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/4.6.4/kaniko-build.py b/linux/ecosystem/qbittorrent/4.6.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/4.6.4/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/4.6.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/qbittorrent/testing/kaniko-build.py b/linux/ecosystem/qbittorrent/testing/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/qbittorrent/testing/kaniko-build.py +++ b/linux/ecosystem/qbittorrent/testing/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/retracker/kaniko-build.py b/linux/ecosystem/retracker/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/retracker/kaniko-build.py +++ b/linux/ecosystem/retracker/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/amxx-sdk/1.10/kaniko-build.py b/linux/ecosystem/teamcity/agent/amxx-sdk/1.10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/amxx-sdk/1.10/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/amxx-sdk/1.10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/amxx-sdk/1.9/kaniko-build.py b/linux/ecosystem/teamcity/agent/amxx-sdk/1.9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/amxx-sdk/1.9/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/amxx-sdk/1.9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/android-sdk/jdk11/kaniko-build.py b/linux/ecosystem/teamcity/agent/android-sdk/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/android-sdk/jdk11/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/android-sdk/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/android-sdk/jdk17/kaniko-build.py b/linux/ecosystem/teamcity/agent/android-sdk/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/android-sdk/jdk17/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/android-sdk/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/android-sdk/jdk8/kaniko-build.py b/linux/ecosystem/teamcity/agent/android-sdk/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/android-sdk/jdk8/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/android-sdk/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/atlassian-sdk/kaniko-build.py b/linux/ecosystem/teamcity/agent/atlassian-sdk/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/atlassian-sdk/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/atlassian-sdk/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/dotnet-sdk/kaniko-build.py b/linux/ecosystem/teamcity/agent/dotnet-sdk/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/dotnet-sdk/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/dotnet-sdk/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/latest/jdk11/kaniko-build.py b/linux/ecosystem/teamcity/agent/latest/jdk11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/latest/jdk11/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/latest/jdk11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/latest/jdk17/kaniko-build.py b/linux/ecosystem/teamcity/agent/latest/jdk17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/latest/jdk17/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/latest/jdk17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/latest/jdk21/kaniko-build.py b/linux/ecosystem/teamcity/agent/latest/jdk21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/latest/jdk21/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/latest/jdk21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/latest/jdk8/kaniko-build.py b/linux/ecosystem/teamcity/agent/latest/jdk8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/latest/jdk8/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/latest/jdk8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node0.12/kaniko-build.py b/linux/ecosystem/teamcity/agent/node0.12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node0.12/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node0.12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node10/kaniko-build.py b/linux/ecosystem/teamcity/agent/node10/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node10/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node10/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node11/kaniko-build.py b/linux/ecosystem/teamcity/agent/node11/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node11/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node11/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node12/kaniko-build.py b/linux/ecosystem/teamcity/agent/node12/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node12/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node12/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node13/kaniko-build.py b/linux/ecosystem/teamcity/agent/node13/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node13/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node13/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node14/kaniko-build.py b/linux/ecosystem/teamcity/agent/node14/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node14/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node14/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node15/kaniko-build.py b/linux/ecosystem/teamcity/agent/node15/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node15/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node15/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node16/kaniko-build.py b/linux/ecosystem/teamcity/agent/node16/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node16/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node16/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node17/kaniko-build.py b/linux/ecosystem/teamcity/agent/node17/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node17/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node17/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node18/kaniko-build.py b/linux/ecosystem/teamcity/agent/node18/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node18/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node18/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node19/kaniko-build.py b/linux/ecosystem/teamcity/agent/node19/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node19/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node19/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node20/kaniko-build.py b/linux/ecosystem/teamcity/agent/node20/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node20/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node20/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node21/kaniko-build.py b/linux/ecosystem/teamcity/agent/node21/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node21/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node21/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node22/kaniko-build.py b/linux/ecosystem/teamcity/agent/node22/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node22/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node22/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node4/kaniko-build.py b/linux/ecosystem/teamcity/agent/node4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node4/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node5/kaniko-build.py b/linux/ecosystem/teamcity/agent/node5/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node5/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node5/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node6/kaniko-build.py b/linux/ecosystem/teamcity/agent/node6/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node6/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node6/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node7/kaniko-build.py b/linux/ecosystem/teamcity/agent/node7/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node7/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node7/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node8/kaniko-build.py b/linux/ecosystem/teamcity/agent/node8/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node8/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node8/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/node9/kaniko-build.py b/linux/ecosystem/teamcity/agent/node9/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/node9/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/node9/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/php7.2/kaniko-build.py b/linux/ecosystem/teamcity/agent/php7.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/php7.2/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/php7.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/php7.3/kaniko-build.py b/linux/ecosystem/teamcity/agent/php7.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/php7.3/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/php7.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/php7.4/kaniko-build.py b/linux/ecosystem/teamcity/agent/php7.4/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/php7.4/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/php7.4/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/php8.0/kaniko-build.py b/linux/ecosystem/teamcity/agent/php8.0/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/php8.0/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/php8.0/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/php8.1/kaniko-build.py b/linux/ecosystem/teamcity/agent/php8.1/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/php8.1/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/php8.1/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/php8.2/kaniko-build.py b/linux/ecosystem/teamcity/agent/php8.2/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/php8.2/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/php8.2/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/php8.3/kaniko-build.py b/linux/ecosystem/teamcity/agent/php8.3/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/php8.3/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/php8.3/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/teamcity/agent/steam-sdk/kaniko-build.py b/linux/ecosystem/teamcity/agent/steam-sdk/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/teamcity/agent/steam-sdk/kaniko-build.py +++ b/linux/ecosystem/teamcity/agent/steam-sdk/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.4.1.3669/ad/kaniko-build.py b/linux/ecosystem/testrail/5.4.1.3669/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.4.1.3669/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.4.1.3669/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.4.1.3669/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.4.1.3669/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.4.1.3669/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.4.1.3669/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.4.1.3669/main/kaniko-build.py b/linux/ecosystem/testrail/5.4.1.3669/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.4.1.3669/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.4.1.3669/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.0.3727/ad/kaniko-build.py b/linux/ecosystem/testrail/5.5.0.3727/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.0.3727/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.0.3727/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.0.3727/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.5.0.3727/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.0.3727/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.0.3727/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.0.3727/main/kaniko-build.py b/linux/ecosystem/testrail/5.5.0.3727/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.0.3727/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.0.3727/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.0.3731/ad/kaniko-build.py b/linux/ecosystem/testrail/5.5.0.3731/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.0.3731/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.0.3731/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.0.3731/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.5.0.3731/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.0.3731/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.0.3731/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.0.3731/main/kaniko-build.py b/linux/ecosystem/testrail/5.5.0.3731/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.0.3731/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.0.3731/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.0.3735/ad/kaniko-build.py b/linux/ecosystem/testrail/5.5.0.3735/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.0.3735/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.0.3735/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.0.3735/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.5.0.3735/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.0.3735/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.0.3735/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.0.3735/main/kaniko-build.py b/linux/ecosystem/testrail/5.5.0.3735/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.0.3735/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.0.3735/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.1.3746/ad/kaniko-build.py b/linux/ecosystem/testrail/5.5.1.3746/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.1.3746/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.1.3746/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.1.3746/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.5.1.3746/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.1.3746/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.1.3746/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.5.1.3746/main/kaniko-build.py b/linux/ecosystem/testrail/5.5.1.3746/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.5.1.3746/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.5.1.3746/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3853/ad/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3853/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3853/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3853/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3853/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3853/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3853/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3853/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3853/main/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3853/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3853/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3853/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3856/ad/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3856/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3856/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3856/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3856/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3856/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3856/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3856/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3856/main/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3856/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3856/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3856/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3861/ad/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3861/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3861/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3861/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3861/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3861/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3861/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3861/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3861/main/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3861/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3861/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3861/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3862/ad/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3862/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3862/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3862/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3862/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3862/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3862/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3862/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3862/main/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3862/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3862/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3862/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3865/ad/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3865/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3865/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3865/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3865/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3865/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3865/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3865/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.6.0.3865/main/kaniko-build.py b/linux/ecosystem/testrail/5.6.0.3865/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.6.0.3865/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.6.0.3865/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.0.3938/ad/kaniko-build.py b/linux/ecosystem/testrail/5.7.0.3938/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.0.3938/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.0.3938/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.0.3938/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.7.0.3938/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.0.3938/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.0.3938/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.0.3938/main/kaniko-build.py b/linux/ecosystem/testrail/5.7.0.3938/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.0.3938/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.0.3938/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.0.3942/ad/kaniko-build.py b/linux/ecosystem/testrail/5.7.0.3942/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.0.3942/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.0.3942/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.0.3942/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.7.0.3942/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.0.3942/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.0.3942/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.0.3942/main/kaniko-build.py b/linux/ecosystem/testrail/5.7.0.3942/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.0.3942/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.0.3942/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.0.3951/ad/kaniko-build.py b/linux/ecosystem/testrail/5.7.0.3951/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.0.3951/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.0.3951/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.0.3951/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.7.0.3951/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.0.3951/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.0.3951/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.0.3951/main/kaniko-build.py b/linux/ecosystem/testrail/5.7.0.3951/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.0.3951/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.0.3951/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.1.4026/ad/kaniko-build.py b/linux/ecosystem/testrail/5.7.1.4026/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.1.4026/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.1.4026/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.1.4026/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.7.1.4026/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.1.4026/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.1.4026/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.1.4026/main/kaniko-build.py b/linux/ecosystem/testrail/5.7.1.4026/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.1.4026/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.1.4026/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.1.4028/ad/kaniko-build.py b/linux/ecosystem/testrail/5.7.1.4028/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.1.4028/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.1.4028/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.1.4028/ldap/kaniko-build.py b/linux/ecosystem/testrail/5.7.1.4028/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.1.4028/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.1.4028/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/5.7.1.4028/main/kaniko-build.py b/linux/ecosystem/testrail/5.7.1.4028/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/5.7.1.4028/main/kaniko-build.py +++ b/linux/ecosystem/testrail/5.7.1.4028/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.0.0.4140/ad/kaniko-build.py b/linux/ecosystem/testrail/6.0.0.4140/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.0.0.4140/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.0.0.4140/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.0.0.4140/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.0.0.4140/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.0.0.4140/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.0.0.4140/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.0.0.4140/main/kaniko-build.py b/linux/ecosystem/testrail/6.0.0.4140/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.0.0.4140/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.0.0.4140/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.0.1.4163/ad/kaniko-build.py b/linux/ecosystem/testrail/6.0.1.4163/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.0.1.4163/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.0.1.4163/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.0.1.4163/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.0.1.4163/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.0.1.4163/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.0.1.4163/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.0.1.4163/main/kaniko-build.py b/linux/ecosystem/testrail/6.0.1.4163/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.0.1.4163/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.0.1.4163/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.0.4367/ad/kaniko-build.py b/linux/ecosystem/testrail/6.1.0.4367/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.0.4367/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.0.4367/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.0.4367/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.1.0.4367/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.0.4367/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.0.4367/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.0.4367/main/kaniko-build.py b/linux/ecosystem/testrail/6.1.0.4367/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.0.4367/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.0.4367/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.0.4369/ad/kaniko-build.py b/linux/ecosystem/testrail/6.1.0.4369/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.0.4369/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.0.4369/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.0.4369/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.1.0.4369/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.0.4369/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.0.4369/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.0.4369/main/kaniko-build.py b/linux/ecosystem/testrail/6.1.0.4369/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.0.4369/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.0.4369/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.1.1020/ad/kaniko-build.py b/linux/ecosystem/testrail/6.1.1.1020/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.1.1020/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.1.1020/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.1.1020/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.1.1.1020/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.1.1020/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.1.1020/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.1.1020/main/kaniko-build.py b/linux/ecosystem/testrail/6.1.1.1020/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.1.1020/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.1.1020/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.1.1021/ad/kaniko-build.py b/linux/ecosystem/testrail/6.1.1.1021/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.1.1021/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.1.1021/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.1.1021/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.1.1.1021/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.1.1021/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.1.1021/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.1.1.1021/main/kaniko-build.py b/linux/ecosystem/testrail/6.1.1.1021/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.1.1.1021/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.1.1.1021/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.0.1085/ad/kaniko-build.py b/linux/ecosystem/testrail/6.2.0.1085/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.0.1085/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.0.1085/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.0.1085/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.2.0.1085/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.0.1085/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.0.1085/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.0.1085/main/kaniko-build.py b/linux/ecosystem/testrail/6.2.0.1085/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.0.1085/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.0.1085/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.1.1003/ad/kaniko-build.py b/linux/ecosystem/testrail/6.2.1.1003/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.1.1003/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.1.1003/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.1.1003/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.2.1.1003/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.1.1003/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.1.1003/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.1.1003/main/kaniko-build.py b/linux/ecosystem/testrail/6.2.1.1003/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.1.1003/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.1.1003/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.1.1005/ad/kaniko-build.py b/linux/ecosystem/testrail/6.2.1.1005/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.1.1005/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.1.1005/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.1.1005/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.2.1.1005/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.1.1005/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.1.1005/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.1.1005/main/kaniko-build.py b/linux/ecosystem/testrail/6.2.1.1005/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.1.1005/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.1.1005/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.2.1107/ad/kaniko-build.py b/linux/ecosystem/testrail/6.2.2.1107/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.2.1107/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.2.1107/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.2.1107/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.2.2.1107/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.2.1107/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.2.1107/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.2.1107/main/kaniko-build.py b/linux/ecosystem/testrail/6.2.2.1107/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.2.1107/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.2.1107/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.3.1114/ad/kaniko-build.py b/linux/ecosystem/testrail/6.2.3.1114/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.3.1114/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.3.1114/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.3.1114/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.2.3.1114/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.3.1114/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.3.1114/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.2.3.1114/main/kaniko-build.py b/linux/ecosystem/testrail/6.2.3.1114/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.2.3.1114/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.2.3.1114/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.3.0.1120/ad/kaniko-build.py b/linux/ecosystem/testrail/6.3.0.1120/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.3.0.1120/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.3.0.1120/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.3.0.1120/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.3.0.1120/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.3.0.1120/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.3.0.1120/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.3.0.1120/main/kaniko-build.py b/linux/ecosystem/testrail/6.3.0.1120/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.3.0.1120/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.3.0.1120/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.3.1.1004/ad/kaniko-build.py b/linux/ecosystem/testrail/6.3.1.1004/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.3.1.1004/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.3.1.1004/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.3.1.1004/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.3.1.1004/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.3.1.1004/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.3.1.1004/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.3.1.1004/main/kaniko-build.py b/linux/ecosystem/testrail/6.3.1.1004/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.3.1.1004/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.3.1.1004/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.3.1.1006/ad/kaniko-build.py b/linux/ecosystem/testrail/6.3.1.1006/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.3.1.1006/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.3.1.1006/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.3.1.1006/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.3.1.1006/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.3.1.1006/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.3.1.1006/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.3.1.1006/main/kaniko-build.py b/linux/ecosystem/testrail/6.3.1.1006/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.3.1.1006/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.3.1.1006/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.4.0.1284/ad/kaniko-build.py b/linux/ecosystem/testrail/6.4.0.1284/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.4.0.1284/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.4.0.1284/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.4.0.1284/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.4.0.1284/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.4.0.1284/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.4.0.1284/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.4.0.1284/main/kaniko-build.py b/linux/ecosystem/testrail/6.4.0.1284/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.4.0.1284/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.4.0.1284/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.4.0.1293/ad/kaniko-build.py b/linux/ecosystem/testrail/6.4.0.1293/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.4.0.1293/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.4.0.1293/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.4.0.1293/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.4.0.1293/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.4.0.1293/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.4.0.1293/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.4.0.1293/main/kaniko-build.py b/linux/ecosystem/testrail/6.4.0.1293/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.4.0.1293/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.4.0.1293/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.0.1298/ad/kaniko-build.py b/linux/ecosystem/testrail/6.5.0.1298/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.0.1298/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.0.1298/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.0.1298/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.5.0.1298/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.0.1298/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.0.1298/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.0.1298/main/kaniko-build.py b/linux/ecosystem/testrail/6.5.0.1298/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.0.1298/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.0.1298/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.1.1002/ad/kaniko-build.py b/linux/ecosystem/testrail/6.5.1.1002/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.1.1002/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.1.1002/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.1.1002/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.5.1.1002/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.1.1002/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.1.1002/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.1.1002/main/kaniko-build.py b/linux/ecosystem/testrail/6.5.1.1002/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.1.1002/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.1.1002/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.3.1001/ad/kaniko-build.py b/linux/ecosystem/testrail/6.5.3.1001/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.3.1001/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.3.1001/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.3.1001/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.5.3.1001/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.3.1001/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.3.1001/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.3.1001/main/kaniko-build.py b/linux/ecosystem/testrail/6.5.3.1001/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.3.1001/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.3.1001/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.4.1002/ad/kaniko-build.py b/linux/ecosystem/testrail/6.5.4.1002/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.4.1002/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.4.1002/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.4.1002/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.5.4.1002/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.4.1002/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.4.1002/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.4.1002/main/kaniko-build.py b/linux/ecosystem/testrail/6.5.4.1002/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.4.1002/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.4.1002/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.4.1007/ad/kaniko-build.py b/linux/ecosystem/testrail/6.5.4.1007/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.4.1007/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.4.1007/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.4.1007/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.5.4.1007/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.4.1007/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.4.1007/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.4.1007/main/kaniko-build.py b/linux/ecosystem/testrail/6.5.4.1007/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.4.1007/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.4.1007/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.5.1009/ad/kaniko-build.py b/linux/ecosystem/testrail/6.5.5.1009/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.5.1009/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.5.1009/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.5.1009/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.5.5.1009/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.5.1009/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.5.1009/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.5.1009/main/kaniko-build.py b/linux/ecosystem/testrail/6.5.5.1009/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.5.1009/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.5.1009/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.6.1014/ad/kaniko-build.py b/linux/ecosystem/testrail/6.5.6.1014/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.6.1014/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.6.1014/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.6.1014/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.5.6.1014/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.6.1014/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.6.1014/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.6.1014/main/kaniko-build.py b/linux/ecosystem/testrail/6.5.6.1014/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.6.1014/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.6.1014/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.7.1000/ad/kaniko-build.py b/linux/ecosystem/testrail/6.5.7.1000/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.7.1000/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.7.1000/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.7.1000/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.5.7.1000/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.7.1000/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.7.1000/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.5.7.1000/main/kaniko-build.py b/linux/ecosystem/testrail/6.5.7.1000/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.5.7.1000/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.5.7.1000/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.6.0.1156/ad/kaniko-build.py b/linux/ecosystem/testrail/6.6.0.1156/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.6.0.1156/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.6.0.1156/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.6.0.1156/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.6.0.1156/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.6.0.1156/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.6.0.1156/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.6.0.1156/main/kaniko-build.py b/linux/ecosystem/testrail/6.6.0.1156/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.6.0.1156/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.6.0.1156/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.6.1.1166/ad/kaniko-build.py b/linux/ecosystem/testrail/6.6.1.1166/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.6.1.1166/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.6.1.1166/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.6.1.1166/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.6.1.1166/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.6.1.1166/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.6.1.1166/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.6.1.1166/main/kaniko-build.py b/linux/ecosystem/testrail/6.6.1.1166/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.6.1.1166/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.6.1.1166/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.7.1.1020/ad/kaniko-build.py b/linux/ecosystem/testrail/6.7.1.1020/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.7.1.1020/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.7.1.1020/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.7.1.1020/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.7.1.1020/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.7.1.1020/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.7.1.1020/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.7.1.1020/main/kaniko-build.py b/linux/ecosystem/testrail/6.7.1.1020/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.7.1.1020/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.7.1.1020/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.7.2.1037/ad/kaniko-build.py b/linux/ecosystem/testrail/6.7.2.1037/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.7.2.1037/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.7.2.1037/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.7.2.1037/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.7.2.1037/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.7.2.1037/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.7.2.1037/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.7.2.1037/main/kaniko-build.py b/linux/ecosystem/testrail/6.7.2.1037/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.7.2.1037/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.7.2.1037/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.7.2.1043/ad/kaniko-build.py b/linux/ecosystem/testrail/6.7.2.1043/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.7.2.1043/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/6.7.2.1043/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.7.2.1043/ldap/kaniko-build.py b/linux/ecosystem/testrail/6.7.2.1043/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.7.2.1043/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/6.7.2.1043/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/6.7.2.1043/main/kaniko-build.py b/linux/ecosystem/testrail/6.7.2.1043/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/6.7.2.1043/main/kaniko-build.py +++ b/linux/ecosystem/testrail/6.7.2.1043/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.0.1057/ad/kaniko-build.py b/linux/ecosystem/testrail/7.0.0.1057/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.0.1057/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.0.1057/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.0.1057/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.0.0.1057/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.0.1057/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.0.1057/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.0.1057/main/kaniko-build.py b/linux/ecosystem/testrail/7.0.0.1057/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.0.1057/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.0.1057/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.1.1002/ad/kaniko-build.py b/linux/ecosystem/testrail/7.0.1.1002/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.1.1002/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.1.1002/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.1.1002/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.0.1.1002/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.1.1002/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.1.1002/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.1.1002/main/kaniko-build.py b/linux/ecosystem/testrail/7.0.1.1002/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.1.1002/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.1.1002/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.1.1013/ad/kaniko-build.py b/linux/ecosystem/testrail/7.0.1.1013/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.1.1013/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.1.1013/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.1.1013/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.0.1.1013/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.1.1013/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.1.1013/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.1.1013/main/kaniko-build.py b/linux/ecosystem/testrail/7.0.1.1013/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.1.1013/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.1.1013/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.2.1014/ad/kaniko-build.py b/linux/ecosystem/testrail/7.0.2.1014/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.2.1014/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.2.1014/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.2.1014/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.0.2.1014/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.2.1014/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.2.1014/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.2.1014/main/kaniko-build.py b/linux/ecosystem/testrail/7.0.2.1014/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.2.1014/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.2.1014/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.2.1015/ad/kaniko-build.py b/linux/ecosystem/testrail/7.0.2.1015/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.2.1015/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.2.1015/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.2.1015/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.0.2.1015/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.2.1015/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.2.1015/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.2.1015/main/kaniko-build.py b/linux/ecosystem/testrail/7.0.2.1015/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.2.1015/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.2.1015/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.2.1016/ad/kaniko-build.py b/linux/ecosystem/testrail/7.0.2.1016/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.2.1016/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.2.1016/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.2.1016/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.0.2.1016/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.2.1016/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.2.1016/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.0.2.1016/main/kaniko-build.py b/linux/ecosystem/testrail/7.0.2.1016/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.0.2.1016/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.0.2.1016/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.4.1.8079/ad/kaniko-build.py b/linux/ecosystem/testrail/7.4.1.8079/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.4.1.8079/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.4.1.8079/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.4.1.8079/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.4.1.8079/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.4.1.8079/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.4.1.8079/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.4.1.8079/main/kaniko-build.py b/linux/ecosystem/testrail/7.4.1.8079/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.4.1.8079/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.4.1.8079/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.4.1.8091/ad/kaniko-build.py b/linux/ecosystem/testrail/7.4.1.8091/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.4.1.8091/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.4.1.8091/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.4.1.8091/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.4.1.8091/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.4.1.8091/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.4.1.8091/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.4.1.8091/main/kaniko-build.py b/linux/ecosystem/testrail/7.4.1.8091/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.4.1.8091/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.4.1.8091/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.4.1.8092/ad/kaniko-build.py b/linux/ecosystem/testrail/7.4.1.8092/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.4.1.8092/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.4.1.8092/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.4.1.8092/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.4.1.8092/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.4.1.8092/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.4.1.8092/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.4.1.8092/main/kaniko-build.py b/linux/ecosystem/testrail/7.4.1.8092/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.4.1.8092/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.4.1.8092/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.1.7010/ad/kaniko-build.py b/linux/ecosystem/testrail/7.5.1.7010/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.1.7010/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.1.7010/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.1.7010/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.5.1.7010/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.1.7010/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.1.7010/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.1.7010/main/kaniko-build.py b/linux/ecosystem/testrail/7.5.1.7010/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.1.7010/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.1.7010/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.1.7012/ad/kaniko-build.py b/linux/ecosystem/testrail/7.5.1.7012/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.1.7012/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.1.7012/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.1.7012/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.5.1.7012/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.1.7012/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.1.7012/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.1.7012/main/kaniko-build.py b/linux/ecosystem/testrail/7.5.1.7012/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.1.7012/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.1.7012/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.1.7013/ad/kaniko-build.py b/linux/ecosystem/testrail/7.5.1.7013/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.1.7013/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.1.7013/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.1.7013/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.5.1.7013/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.1.7013/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.1.7013/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.1.7013/main/kaniko-build.py b/linux/ecosystem/testrail/7.5.1.7013/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.1.7013/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.1.7013/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.2.1002/ad/kaniko-build.py b/linux/ecosystem/testrail/7.5.2.1002/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.2.1002/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.2.1002/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.2.1002/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.5.2.1002/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.2.1002/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.2.1002/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.2.1002/main/kaniko-build.py b/linux/ecosystem/testrail/7.5.2.1002/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.2.1002/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.2.1002/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.3.1000/ad/kaniko-build.py b/linux/ecosystem/testrail/7.5.3.1000/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.3.1000/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.3.1000/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.3.1000/ldap/kaniko-build.py b/linux/ecosystem/testrail/7.5.3.1000/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.3.1000/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.3.1000/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/7.5.3.1000/main/kaniko-build.py b/linux/ecosystem/testrail/7.5.3.1000/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/7.5.3.1000/main/kaniko-build.py +++ b/linux/ecosystem/testrail/7.5.3.1000/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/8.0.0.1089/ad/kaniko-build.py b/linux/ecosystem/testrail/8.0.0.1089/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/8.0.0.1089/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/8.0.0.1089/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/8.0.0.1089/ldap/kaniko-build.py b/linux/ecosystem/testrail/8.0.0.1089/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/8.0.0.1089/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/8.0.0.1089/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/8.0.0.1089/main/kaniko-build.py b/linux/ecosystem/testrail/8.0.0.1089/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/8.0.0.1089/main/kaniko-build.py +++ b/linux/ecosystem/testrail/8.0.0.1089/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/8.0.1.1029/ad/kaniko-build.py b/linux/ecosystem/testrail/8.0.1.1029/ad/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/8.0.1.1029/ad/kaniko-build.py +++ b/linux/ecosystem/testrail/8.0.1.1029/ad/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/8.0.1.1029/ldap/kaniko-build.py b/linux/ecosystem/testrail/8.0.1.1029/ldap/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/8.0.1.1029/ldap/kaniko-build.py +++ b/linux/ecosystem/testrail/8.0.1.1029/ldap/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/testrail/8.0.1.1029/main/kaniko-build.py b/linux/ecosystem/testrail/8.0.1.1029/main/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/testrail/8.0.1.1029/main/kaniko-build.py +++ b/linux/ecosystem/testrail/8.0.1.1029/main/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/torrserver/kaniko-build.py b/linux/ecosystem/torrserver/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/torrserver/kaniko-build.py +++ b/linux/ecosystem/torrserver/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/torrust-index/kaniko-build.py b/linux/ecosystem/torrust-index/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/torrust-index/kaniko-build.py +++ b/linux/ecosystem/torrust-index/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/torrust-tracker/kaniko-build.py b/linux/ecosystem/torrust-tracker/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/torrust-tracker/kaniko-build.py +++ b/linux/ecosystem/torrust-tracker/kaniko-build.py @@ -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() diff --git a/linux/ecosystem/vk2discord/kaniko-build.py b/linux/ecosystem/vk2discord/kaniko-build.py index e2034145c..e693b5c17 100644 --- a/linux/ecosystem/vk2discord/kaniko-build.py +++ b/linux/ecosystem/vk2discord/kaniko-build.py @@ -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()