Skip to content

Commit

Permalink
update release.py to update explainer in values.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ukclivecox committed May 24, 2020
1 parent 146fd95 commit b17912f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,29 @@ def update_operator_values_yaml_file_prepackaged_images(fpath, seldon_core_versi
print("error updating operator values yaml for prepackaged server images".format(**locals()))
print(err)

def update_operator_values_yaml_file_explainer_image(fpath, seldon_core_version, debug=False):
fpath = os.path.realpath(fpath)
if debug:
print("processing [{}]".format(fpath))
args = [
"sed",
"-i",
"s|seldonio/alibiexplainer:\(.*\)|seldonio/alibiexplainer:{seldon_core_version}|".format(
**locals()
),
fpath,
]
err, out = run_command(args, debug)
# pp(out)
# pp(err)
if err == None:
print("updated operator values yaml for prepackaged server images".format(**locals()))
else:
print("error updating operator values yaml for prepackaged server images".format(**locals()))
print(err)



def update_operator_kustomize_prepackaged_images(fpath, seldon_core_version, debug=False):
fpath = os.path.realpath(fpath)
if debug:
Expand Down Expand Up @@ -342,6 +365,10 @@ def set_version(
update_operator_values_yaml_file_prepackaged_images(
operator_values_yaml_file_realpath, seldon_core_version, debug
)
update_operator_values_yaml_file_explainer_image(
operator_values_yaml_file_realpath, seldon_core_version, debug
)


if operator_kustomize_yaml_file != None:
update_operator_kustomize_prepackaged_images(
Expand Down

0 comments on commit b17912f

Please sign in to comment.