8000 fix(api): reset git.hash for child pipeline with different repo as pa… · ovh/cds@b8f0dc1 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit b8f0dc1

Browse files
yesnaultfsamin
authored andcommitted
fix(api): reset git.hash for child pipeline with different repo as parent (#3203)
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
1 parent eaf1cda commit b8f0dc1

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

engine/api/suggest.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,11 @@ func (api *API) getVariablesHandler() service.Handler {
110110
cdsVar := []string{
111111
"{{.cds.version}}",
112112
"{{.cds.application}}",
113-
"{{.cds.buildNumber}}",
114113
"{{.cds.environment}}",
115114
"{{.cds.job}}",
116115
"{{.cds.manual}}",
117116
"{{.cds.node}}",
118117
"{{.cds.node.id}}",
119-
"{{.cds.parent.application}}",
120-
"{{.cds.parent.buildNumber}}",
121-
"{{.cds.parent.pipeline}}",
122118
"{{.cds.pipeline}}",
123119
"{{.cds.project}}",
124120
"{{.cds.run}}",
@@ -143,6 +139,7 @@ func (api *API) getVariablesHandler() service.Handler {
143139
"{{.git.repository}}",
144140
"{{.git.url}}",
145141
"{{.git.http_url}}",
142+
"{{.git.server}}",
146143
}
147144
allVariables = append(allVariables, gitVar...)
148145

engine/api/workflow/execute_node_run.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,7 @@ func getVCSInfos(ctx context.Context, db gorp.SqlExecutor, store cache.Store, vc
847847
if !isChildNode {
848848
return vcsInfos, sdk.NewError(sdk.ErrNotFound, fmt.Errorf("repository %s not found", vcsInfos.Repository))
849849
}
850+
vcsInfos.Hash = ""
850851
vcsInfos.Repository = applicationRepositoryFullname
851852
}
852853
}

0 commit comments

Comments
 (0)
0