Add temp fix for bug in mcp builder
This commit is contained in:
parent
9be65f8c19
commit
ca8ef29ae4
2 changed files with 33 additions and 0 deletions
28
ccp/patch1
Normal file
28
ccp/patch1
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
diff --git a/microservices/build.py b/microservices/build.py
|
||||||
|
index 1f26b5a..e419343 100644
|
||||||
|
--- a/microservices/build.py
|
||||||
|
+++ b/microservices/build.py
|
||||||
|
@@ -84,7 +84,7 @@ def find_dockerfiles(repository_name, tmp_dir, match=True):
|
||||||
|
return dockerfiles
|
||||||
|
|
||||||
|
|
||||||
|
-IMAGE_FULL_NAME_RE = "(([\\w_-]+)\\/)?([\\w_-]+)(:([\\w_.-]+))?"
|
||||||
|
+IMAGE_FULL_NAME_RE = "(.*\/)?(([\\w_-]+)\\/)?([\\w_-]+)(:([\\w_.-]+))?"
|
||||||
|
IMAGE_FULL_NAME_PATTERN = re.compile(IMAGE_FULL_NAME_RE)
|
||||||
|
|
||||||
|
DOCKER_FILE_FROM_PATTERN = re.compile(
|
||||||
|
|
||||||
|
diff --git a/microservices/common/jinja_utils.py b/microservices/common/jinja_utils.py
|
||||||
|
index c9c8cd2..37ff6f2 100644
|
||||||
|
--- a/microservices/common/jinja_utils.py
|
||||||
|
+++ b/microservices/common/jinja_utils.py
|
||||||
|
@@ -16,6 +16,9 @@ def str_to_bool(text):
|
||||||
|
|
||||||
|
def jinja_render(path):
|
||||||
|
variables = {k: v for k, v in CONF.images.items()}
|
||||||
|
+ if CONF.builder.push and CONF.registry.address:
|
||||||
|
+ variables['namespace'] = '%s/%s' % (CONF.registry.address,
|
||||||
|
+ variables['namespace'])
|
||||||
|
|
||||||
|
env = jinja2.Environment(loader=jinja2.FileSystemLoader(
|
||||||
|
os.path.dirname(path)))
|
|
@ -9,6 +9,11 @@
|
||||||
rsync_opts:
|
rsync_opts:
|
||||||
- "--exclude=/microservices-repos"
|
- "--exclude=/microservices-repos"
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Patch MCP
|
||||||
|
shell: patch -p1 < ../patch1
|
||||||
|
args:
|
||||||
|
chdir: /root/ccp/microservices/
|
||||||
|
creates: /usr/local/bin/mcp-microservices
|
||||||
- name: Install MCP
|
- name: Install MCP
|
||||||
shell: "{{ item }}"
|
shell: "{{ item }}"
|
||||||
args:
|
args:
|
||||||
|
|
Loading…
Reference in a new issue