@@ -96,20 +96,21 @@ def update_app_version(app_version, c_name, e_name, github_repo):
96
96
# Always update the latest version key
97
97
redis .json ().set ('latest:versions' , f'$.{ version_key } ' , version_data )
98
98
log .info (f'Updating redis key with latest version. { version_key } = { version_data } ' )
99
- env_data = []
100
- update_sc = False
101
- for e in component ["attributes" ]["environments" ]:
102
- if e_name == e ["name" ]:
103
- if e ["build_image_tag" ] is None :
104
- e ["build_image_tag" ] = []
105
- if app_version != e ["build_image_tag" ]:
106
- env_data .append ({"id" : e ["id" ], "build_image_tag" : app_version })
107
- update_sc = True
108
- else :
109
- env_data .append ({"id" : e ["id" ]})
110
- if update_sc :
111
- data = {"environments" : env_data }
112
- update_sc_component (c_id , data )
99
+ if (endpoint_type == 'info' ):
100
+ env_data = []
101
+ update_sc = False
102
+ for e in component ["attributes" ]["environments" ]:
103
+ if e_name == e ["name" ]:
104
+ if e ["build_image_tag" ] is None :
105
+ e ["build_image_tag" ] = []
106
+ if app_version != e ["build_image_tag" ]:
107
+ env_data .append ({"id" : e ["id" ], "build_image_tag" : app_version })
108
+ update_sc = True
109
+ else :
110
+ env_data .append ({"id" : e ["id" ]})
111
+ if update_sc :
112
+ data = {"environments" : env_data }
113
+ update_sc_component (c_id , data )
113
114
114
115
except Exception as e :
115
116
log .error (e )
0 commit comments