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

the git "ref:" argument should accept a valid git reference #618

Closed
jmtd opened this issue Sep 18, 2019 · 1 comment · Fixed by #634

Comments

@jmtd
Copy link
Contributor

@jmtd jmtd commented Sep 18, 2019

Describe the bug

cekit permits specifying a git ref for a module, but this does not translate into a git ref underneath, but must actually be a tag or branch name (valid argument to git clone -b). It would be nicer if this could be a real git ref (e.g. be123a80c5497a595e2a997a0f1dbe14c9e3442e)

To reproduce

Attempt to set the git ref for an external module to a ref that is not a branch or tag name.

Expected behavior

Remote repository cloned and local branch set up to reference the ref specified, even if it was a sha1-id.

  • CEKit version: 3.4.0
@goldmann goldmann self-assigned this Sep 25, 2019
@goldmann goldmann added this to the 3.6.0 milestone Sep 25, 2019
@goldmann goldmann added this to To do in Release 3.6 via automation Nov 4, 2019
@goldmann goldmann moved this from To do to In progress in Release 3.6 Nov 4, 2019
@goldmann

This comment has been minimized.

Copy link
Contributor

@goldmann goldmann commented Nov 4, 2019

I'm looking at this now. Changing this to accept any ref is very simple, but the only thing that bothers me a bit is that it is suboptimal: we need to clone the whole repository first so that locally we have all information and only then checkout a specific ref. For large repositories it may be an issue making the run slower, but I guess the feature to use any ref is probably worth it.

goldmann added a commit to goldmann/cekit that referenced this issue Nov 4, 2019
This makes it possible to use any valid reference as the
'ref' value for a Git resource. This type of resource is used
for example for defining module registries.

This accepts now branch, tag, commit or any other valid ref.

Fixes cekit#618
@goldmann goldmann closed this in #634 Nov 5, 2019
Release 3.6 automation moved this from In progress to Done Nov 5, 2019
goldmann added a commit that referenced this issue Nov 5, 2019
This makes it possible to use any valid reference as the
'ref' value for a Git resource. This type of resource is used
for example for defining module registries.

This accepts now branch, tag, commit or any other valid ref.

Fixes #618
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Release 3.6
  
Done
2 participants
You can’t perform that action at this time.