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

.cr-index folder must be manually created #187

Open
ralgozino opened this issue May 12, 2022 · 0 comments
Open

.cr-index folder must be manually created #187

ralgozino opened this issue May 12, 2022 · 0 comments

Comments

@ralgozino
Copy link

ralgozino commented May 12, 2022

Hello!

Maybe I'm doing something wrong here, but I needed to manually create the .cr-index folder for the cr index command to work.

This is what I did:

$ docker run --rm --entrypoint=sh -it -v $PWD:/app quay.io/helmpack/chart-releaser:v1.4.0
/app # cr package chart
Successfully packaged chart in /app/chart and saved it to: .cr-release-packages/gatekeeper-policy-manager-0.2.0.tgz
/app # cr index --owner sighupio --git-repo gatekeeper-policy-manager
Loading index file from git repository .cr-index/index.yaml
Preparing worktree (detached HEAD e1f5fee)
HEAD is now at e1f5fee Clean branch for Helm Chart Repository with GitHub Pages
Found gatekeeper-policy-manager-0.2.0.tgz
Extracting chart metadata from .cr-release-packages/gatekeeper-policy-manager-0.2.0.tgz
Calculating Hash for .cr-release-packages/gatekeeper-policy-manager-0.2.0.tgz
Updating index .cr-index/index.yaml
Error: open .cr-index/index.yaml3862730865: no such file or directory
Usage:
  cr index [flags]

Flags:
  -b, --git-base-url string            GitHub Base URL (only needed for private GitHub) (default "https://api.github.com/")
  -r, --git-repo string                GitHub repository
  -u, --git-upload-url string          GitHub Upload URL (only needed for private GitHub) (default "https://uploads.github.com/")
  -h, --help                           help for index
  -i, --index-path string              Path to index file (default ".cr-index/index.yaml")
  -o, --owner string                   GitHub username or organization
  -p, --package-path string            Path to directory with chart packages (default ".cr-release-packages")
      --pages-branch string            The GitHub pages branch (default "gh-pages")
      --pages-index-path string        The GitHub pages index path (default "index.yaml")
      --pr                             Create a pull request for index.yaml against the GitHub Pages branch (must not be set if --push is set)
      --push                           Push index.yaml to the GitHub Pages branch (must not be set if --pr is set)
      --release-name-template string   Go template for computing release names, using chart metadata (default "{{ .Name }}-{{ .Version }}")
      --remote string                  The Git remote used when creating a local worktree for the GitHub Pages branch (default "origin")
  -t, --token string                   GitHub Auth Token (only needed for private repos)

Global Flags:
      --config string   Config file (default is $HOME/.cr.yaml)

/app # cat .cr-index/index.yaml
cat: can't open '.cr-index/index.yaml': No such file or directory
/app # mkdir .cr-index
/app # cr index --owner sighupio --git-repo gatekeeper-policy-manager
Loading index file from git repository .cr-index/index.yaml
Preparing worktree (detached HEAD e1f5fee)
HEAD is now at e1f5fee Clean branch for Helm Chart Repository with GitHub Pages
Found gatekeeper-policy-manager-0.2.0.tgz
Extracting chart metadata from .cr-release-packages/gatekeeper-policy-manager-0.2.0.tgz
Calculating Hash for .cr-release-packages/gatekeeper-policy-manager-0.2.0.tgz
Updating index .cr-index/index.yaml
/app # cat .cr-index/index.yaml
apiVersion: v1
entries:
  gatekeeper-policy-manager:
[...] # truncated output

EDIT: I got the same behaviour in CI and locally.

@ralgozino ralgozino changed the title .cr-index folder must be created manually .cr-index folder must be manually created May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant