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

[BUG] targetBranch needs remote #577

Closed
mateusoliveira43 opened this issue Jul 11, 2023 · 3 comments · Fixed by #601
Closed

[BUG] targetBranch needs remote #577

mateusoliveira43 opened this issue Jul 11, 2023 · 3 comments · Fixed by #601

Comments

@mateusoliveira43
Copy link

Is this a BUG REPORT or FEATURE REQUEST?:

BUG

Version of Helm and Kubernetes:

ct version

Version:	 v3.9.0
Git commit:	 88cc7026481da7468e34a614b8ca4f0da42c063c
Date:		 2023-07-10T16:57:18Z
License:	 Apache 2.0

What happened:

With the add of verify if targetBranch is present in git repo, ct lint fails with false positive of failed linting charts: failed identifying charts to process: targetBranch 'master' does not exist.

What you expected to happen:

ct run normally.

How to reproduce it (as minimally and precisely as possible):

You need to run ct targeting a remote not default, since this command does not use remote information.

Ex.: ct lint --remote other --config ct.yaml --target-branch master --debug

Also, a CI run with this error.

Note: This is not fixed with passing target-branch as "remote/branch", as it fails the following check.

Another CI run with the other error.

@jouve
Copy link
Contributor

jouve commented Jul 21, 2023

as a workaround, you can add the following

before_script:
  - git branch "$target_branch" "origin/$target_branch"

@xinzhang-lotusflare
Copy link

xinzhang-lotusflare commented Aug 8, 2023

You can checkout the target branch to make sue it exists locally, then checkout back to original branch. It works for me.

@thjaeckle
Copy link

This was working with Chart Testing 3.8.0 - and for me is also broken (as in: updated to 3.9.0 without any changes and got the message Error: targetBranch 'master' does not exist) in 3.9.0.

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

Successfully merging a pull request may close this issue.

4 participants