You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ccbbba7 I documented the current procedure for --publish-chart.
We currently act as if we have a --force-publish-chart flag set by default when we use --publish-chart. I think we should require --force-publish-chart to be passed to get the current behavior where a new chart of the same version will override an existing chart.
This relates to #60 that is about making chartpress provide a easy way to check if a chart is already published before running tests etc again if nothing has changed.
The text was updated successfully, but these errors were encountered:
consideRatio
changed the title
PR Discussion: require --force-publish-chart to override charts
PR Discussion: require --force-publish-chart to override charts during --publish-charts
Oct 30, 2019
I've considered how to go about the check if the chart is already published. I think the way to go is to not checkout the git repository, it is after all supposed to be a helm chart registry somewhere, so simply accessing the index.yaml directly and looking for the chart version may make more sense. Checking out a single file from a git repo isn't easy without cloning every file, at least not in a systematic way as GitHub forbits the use of git archive that would enable that but instead would allow for more web-server request related ways...
Hmm... Yeah working directly with the helm chart registry index.yaml file seems to make the most sense. It will require the helm chart registry to be live on the web though, but that may be fine.
A function that returns true or false depending on if a helm chart repository (with a index.yaml file in it) contains a passed URL.
How we do it
def_has_chart(chart_name, chart_version, chart_repo_url):
# get the chart_repo_url# check if the chart_name / chart_version is listed within chart_repo_url/index.yaml# --- https://jupyterhub.github.io/helm-chart/index.yaml# --- parse yaml into python object using the available `yaml` object from ruamel-yaml# --- loop over index_yaml["entries"]["name-of-chart"]# --- look for an entry with an exact matching version field.# return True / False
In ccbbba7 I documented the current procedure for --publish-chart.
We currently act as if we have a
--force-publish-chart
flag set by default when we use--publish-chart
. I think we should require--force-publish-chart
to be passed to get the current behavior where a new chart of the same version will override an existing chart.This relates to #60 that is about making chartpress provide a easy way to check if a chart is already published before running tests etc again if nothing has changed.
The text was updated successfully, but these errors were encountered: