Commit 3c431769 authored by Alexander Lercher's avatar Alexander Lercher

Added build and deploy automation-scripts

parent ddd2bf50
import os
docker_reg = 'localhost:5000'
paths = []
for r, _, f in os.walk('./'):
for file in f:
if 'Dockerfile' == file:
paths.append(os.path.join(r, ''))
command_args = [{'path': path,
# ./transaction-hub-out/tokenized-decision-making-microservice/Dockerfile
# -> tokenized-decision-making
'name': '-'.join(str(path).split('/')[2].split('-')[:-1])}
for path
in paths]
for command_arg in command_args:
image_name = f"{docker_reg}/{command_arg['name']}"
os.system(f"docker image build -t {image_name} {command_arg['path']}")
os.system(f"docker push {image_name}")
import os
docker_reg = 'localhost:5000'
paths = []
for r, _, f in os.walk('./'):
for file in f:
if 'deployment.yml' == file:
paths.append(os.path.join(r, ''))
for path in paths:
os.system(f"kubectl apply -f {path}deployment.yml")
os.system(f"kubectl apply -f {path}loadbalancer.yml")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment