Skip to content

Commit 49daee2

Browse files
committed
feat(controller): inject tag version value in environment.
1 parent f0a8fd7 commit 49daee2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

controller/registry/private.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def publish_release(source, config, target):
5353
# construct the new image
5454
image['parent'] = image['id']
5555
image['id'] = _new_id()
56-
image['config']['Env'] = _construct_env(image['config']['Env'], config)
56+
image['config']['Env'] = _construct_env(image['config']['Env'], config, target_image, target_tag)
5757
# update and tag the new image
5858
_commit(target_image, image, _empty_tar_archive(), target_tag)
5959

@@ -157,9 +157,11 @@ def _put_tag(image_id, repository_path, tag):
157157
# utility functions
158158

159159

160-
def _construct_env(env, config):
160+
def _construct_env(env, config, target_image, target_tag):
161161
"Update current environment with latest config"
162162
new_env = []
163+
new_env.append("{}={}".format('DEIS_APP', target_image))
164+
new_env.append("{}={}".format('DEIS_RELEASE', target_tag))
163165
# see if we need to update existing ENV vars
164166
for e in env:
165167
k, v = e.split('=', 1)

0 commit comments

Comments
 (0)