Skip to content

Commit 16e92ee

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

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

controller/registry/private.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ 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, target_image, target_tag)
56+
config['DEIS_APP'] = target_image
57+
config['DEIS_RELEASE'] = target_tag
58+
image['config']['Env'] = _construct_env(image['config']['Env'], config)
5759
# update and tag the new image
5860
_commit(target_image, image, _empty_tar_archive(), target_tag)
5961

@@ -157,11 +159,9 @@ def _put_tag(image_id, repository_path, tag):
157159
# utility functions
158160

159161

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

0 commit comments

Comments
 (0)