2828 "containers": [
2929 {
3030 "name": "$id",
31- "image": "quay.io/deisci/slugrunner:v2-beta ",
31+ "image": "$slugimage ",
3232 "env": [
3333 {
3434 "name":"PORT",
172172 "containers": [
173173 {
174174 "name": "$containername",
175- "image": "quay.io/deisci/slugrunner:v2-beta ",
175+ "image": "$slugimage ",
176176 "imagePullPolicy": "Always",
177177 "env": [
178178 {
@@ -469,14 +469,18 @@ def run(self, name, image, entrypoint, command, **kwargs):
469469 name = name .replace ('.' , '-' ).replace ('_' , '-' )
470470 imgurl = self .registry + '/' + image
471471 POD = POD_TEMPLATE
472- if image .startswith ('http://' ) or image .startswith ('https://' ):
473- POD = POD_BTEMPLATE
474- imgurl = image
472+
475473 l = {
476474 'id' : name ,
477475 'version' : self .apiversion ,
478476 'image' : imgurl ,
479477 }
478+
479+ if image .startswith ('http://' ) or image .startswith ('https://' ):
480+ POD = POD_BTEMPLATE
481+ l ["image" ] = image
482+ l ["slugimage" ] = settings .SLUGRUNNER_IMAGE
483+
480484 template = string .Template (POD ).substitute (l )
481485 if command .startswith ('-c ' ):
482486 args = command .split (' ' , 1 )
@@ -846,11 +850,6 @@ def _create_rc(self, namespace, name, image, command, **kwargs): # noqa
846850 imgurl = self .registry + "/" + image
847851 TEMPLATE = RCD_TEMPLATE
848852
849- # Check if it is a slug builder image.
850- if kwargs .get ('build_type' ) == "buildpack" :
851- imgurl = image
852- TEMPLATE = RCB_TEMPLATE
853-
854853 l = {
855854 "name" : name ,
856855 "id" : namespace ,
@@ -861,6 +860,13 @@ def _create_rc(self, namespace, name, image, command, **kwargs): # noqa
861860 "containername" : container_name ,
862861 "type" : app_type ,
863862 }
863+
864+ # Check if it is a slug builder image.
865+ if kwargs .get ('build_type' ) == "buildpack" :
866+ l ["image" ] = image
867+ l ["slugimage" ] = settings .SLUGRUNNER_IMAGE
868+ TEMPLATE = RCB_TEMPLATE
869+
864870 template = json .loads (string .Template (TEMPLATE ).substitute (l ))
865871
866872 # apply tags as needed
0 commit comments