Conversation
Signed-off-by: Benjamin Coenen <[email protected]>
Signed-off-by: Benjamin Coenen <[email protected]>
Signed-off-by: Benjamin Coenen <[email protected]>
Signed-off-by: Benjamin Coenen <[email protected]>
engine/worker/builtin_gitclone.go
Outdated
| gitURLHTTP := sdk.ParameterValue(*params, "git.http_url") | ||
| if gitURLSSH == url || gitURLHTTP == url { | ||
| extractInfo(w, dir, params, clone.Branch, clone.CheckoutCommit, sendLog) | ||
| extractInfo(w, dir, params, clone.Tag, clone.Branch, clone.CheckoutCommit, sendLog) |
There was a problem hiding this comment.
Error return value of extractInfo is not checked
engine/worker/builtin_gitclone.go
Outdated
|
|
||
| git.LogFunc = log.Info | ||
|
|
||
| sendLog(fmt.Sprintf("cloneOpts ---> %+v\n", *clone)) |
engine/worker/builtin_gitclone.go
Outdated
| sendLog(fmt.Sprintf("git.branch: %s", branch)) | ||
| } | ||
|
|
||
| if tag != "" && tag != "{{.git.tag}}" { |
There was a problem hiding this comment.
check tag != "{{.git.tag}}" to remove. .git.tag is not a default value on action GitClone
sdk/repositories_manager.go
Outdated
| //VCSTag represents tag known by the repositories manager | ||
| type VCSTag struct { | ||
| Tag string `json:"tag"` | ||
| Sha string `json:"sha"` |
There was a problem hiding this comment.
should be great to have a comment for the difference between Sha and Hash here
|
missing :
|
engine/worker/builtin_gitclone.go
Outdated
| password := sdk.ParameterFind(&a.Parameters, "password") | ||
| branch := sdk.ParameterFind(&a.Parameters, "branch") | ||
| defaultBranch := sdk.ParameterValue(*params, "git.default_branch") | ||
| tag := sdk.ParameterValue(*params, "git.tag") |
There was a problem hiding this comment.
tag have to be retrieve from a.Parameter, not params
Signed-off-by: Benjamin Coenen <[email protected]>
Signed-off-by: Benjamin Coenen <[email protected]>
Signed-off-by: Benjamin Coenen <[email protected]>
|
CDS Report it#5566.0 ✘
|
| func (c *vcsClient) CommitsBetweenRefs(ctx context.Context, fullname, base, head string) ([]sdk.VCSCommit, error) { | ||
| var commits []sdk.VCSCommit | ||
| path := fmt.Sprintf("/vcs/%s/repos/%s/commits?base=%s&head=%s", c.name, fullname, url.QueryEscape(base), url.QueryEscape(head)) | ||
| if code, err := c.doJSONRequest(context.Background(), "GET", path, nil, &commits); err != nil { |
Signed-off-by: Benjamin Coenen <[email protected]>
Signed-off-by: Benjamin Coenen <[email protected]>
Signed-off-by: Benjamin Coenen <[email protected]>
Add support of git tag in CDS.
cc @Alkorin
@ovh/cds