Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix helm chart URLs #1204

Merged
merged 1 commit into from
Jan 27, 2023
Merged

Fix helm chart URLs #1204

merged 1 commit into from
Jan 27, 2023

Conversation

janorn
Copy link
Contributor

@janorn janorn commented Jan 27, 2023

SUMMARY

The URL in the last change of the helm chart index generation is incorrect.
This will fix the URL and also put releases in relevant subdirs to make the final URL in the chart correct.

fixes #1200

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
ADDITIONAL INFORMATION

Download URL in the current index.yaml file doesn't point to the release file.


@janorn
Copy link
Contributor Author

janorn commented Jan 27, 2023

If someone could help with testing the workflow I would appreciate it. I have tested the command in itself and it works.

$ find helmdir
helmdir
helmdir/1.1.3
helmdir/1.1.3/awx-operator-1.1.3.tgz
helmdir/1.1.4
helmdir/1.1.4/awx-operator-1.1.4.tgz
$ helm repo index helmdir --url https://github.com/ansible/awx-operator/releases/download/
$ find helmdir
helmdir
helmdir/1.1.3
helmdir/1.1.3/awx-operator-1.1.3.tgz
helmdir/1.1.4
helmdir/1.1.4/awx-operator-1.1.4.tgz
helmdir/index.yaml

helmdir/index.yaml

apiVersion: v1
entries:
  awx-operator:
  - apiVersion: v2
    appVersion: 1.1.4
    created: "2023-01-27T15:12:40.5238315+01:00"
    description: A Helm chart for the AWX Operator
    digest: 0d2ddc1eb31a3e61fca1b37d6be957423aba79edc2f8343e2f4e27fd6030a3e7
    name: awx-operator
    type: application
    urls:
    - https://github.com/ansible/awx-operator/releases/download/1.1.4/awx-operator-1.1.4.tgz
    version: 1.1.4
  - apiVersion: v2
    appVersion: 1.1.3
    created: "2023-01-27T15:12:40.5223565+01:00"
    description: A Helm chart for the AWX Operator
    digest: 0ea2087d0201e790db8aa30f4680d0ad2f7773520759ee6641c1d0c5e4ac2aa8
    name: awx-operator
    type: application
    urls:
    - https://github.com/ansible/awx-operator/releases/download/1.1.3/awx-operator-1.1.3.tgz
    version: 1.1.3

@@ -381,17 +381,18 @@ helm-index:
result=$$?;\
if [ $${result} -eq 0 ]; then\
echo "Downloaded $${dl_url}";\
mv ./$(CHART_REPO)-$${tag}.tgz .cr-release-packages/;\
mkdir -p .cr-release-packages/$${tag}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janorn I tested this out locally, it throws a syntax error because ln 384 is missing a ;\ at the end of it. Otherwise, this change works. Could you update the PR, then I can merge?

@rooftopcellist
Copy link
Member

@janorn Using your changes, I created this PR to update the gh-pages branch.

@rooftopcellist
Copy link
Member

Sorry @janorn I merged that a bit pre-maturely. Here is the patch for fixing that syntax error I mentioned:

This is the error I was getting running locally:

	if [ ${result} -eq 0 ]; then\
		echo "Downloaded ${dl_url}";\
		mkdir -p .cr-release-packages/${tag}
/bin/sh: -c: line 9: syntax error: unexpected end of file

@janorn
Copy link
Contributor Author

janorn commented Jan 27, 2023

You beat me to it 😂

@rooftopcellist
Copy link
Member

Thanks @janorn !

It looks like it's working for me, can you confirm that the updated index.yaml is working for you as expected?

@janorn
Copy link
Contributor Author

janorn commented Jan 27, 2023

@rooftopcellist i just took of. I can test later tonight but at the moment I'm on the move.

@janorn
Copy link
Contributor Author

janorn commented Jan 29, 2023

@rooftopcellist
I have tested and it seems to work as it should now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

failed to fetch https://ansible.github.io/awx-operator/awx-operator-1.1.3.tgz : 404 Not Found
2 participants