Skip to content
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.

Further Jinja2 Variable Expansion in container.yml #732

Open
gmorell opened this issue Sep 15, 2017 · 0 comments
Open

Further Jinja2 Variable Expansion in container.yml #732

gmorell opened this issue Sep 15, 2017 · 0 comments

Comments

@gmorell
Copy link

gmorell commented Sep 15, 2017

ISSUE TYPE
  • Feature Idea
container.yml
version: "2"
settings:
  conductor_base: centos:7
  project_name: "{{ some_variable }}"
SUMMARY

Support Jinja2 Variable expansion in other parts of container.yml such as settings

STEPS TO REPRODUCE

See container.yml above

EXPECTED RESULTS

That the variable in question would be expanded into the setting

ACTUAL RESULTS

Attempting this currently yeids:

ERROR   Unknown exception       
Traceback (most recent call last):
  File "/project/venv3/lib64/python3.6/site-packages/docker/api/client.py", line 214, in _raise_for_status
    response.raise_for_status()
  File "/project/venv3/lib64/python3.6/site-packages/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localunixsocket/v1.28/images/%7B%7B+project_name+%7D%7D-conductor:latest/json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/project/venv3/lib64/python3.6/site-packages/container/cli.py", line 299, in __call__
    getattr(core, u'hostcmd_{}'.format(args.subcommand))(**vars(args))
  File "/project/venv3/lib64/python3.6/site-packages/container/__init__.py", line 28, in __wrapped__
    return fn(*args, **kwargs)
  File "/project/venv3/lib64/python3.6/site-packages/container/core.py", line 159, in hostcmd_build
    conductor_image_id = engine_obj.get_latest_image_id_for_service('conductor')
  File "/project/venv3/lib64/python3.6/site-packages/container/docker/engine.py", line 555, in get_latest_image_id_for_service
    image = self.get_latest_image_for_service(service_name)
  File "/project/venv3/lib64/python3.6/site-packages/container/docker/engine.py", line 563, in get_latest_image_for_service
    '%s:latest' % self.image_name_for_service(service_name))
  File "/project/venv3/lib64/python3.6/site-packages/docker/models/images.py", line 190, in get
    return self.prepare_model(self.client.api.inspect_image(name))
  File "/project/venv3/lib64/python3.6/site-packages/docker/utils/decorators.py", line 21, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/project/venv3/lib64/python3.6/site-packages/docker/api/image.py", line 262, in inspect_image
    self._get(self._url("/images/{0}/json", image)), True
  File "/project/venv3/lib64/python3.6/site-packages/docker/api/client.py", line 220, in _result
    self._raise_for_status(response)
  File "/project/venv3/lib64/python3.6/site-packages/docker/api/client.py", line 216, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/project/venv3/lib64/python3.6/site-packages/docker/errors.py", line 30, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.NotFound: 404 Client Error: Not Found ("no such image: {{+some_variable+}}-conductor:latest: invalid reference format")
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants