mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 05:36:50 +08:00
remove length check since range will not iterate on 0 length slices
This commit is contained in:
@@ -163,21 +163,17 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts
|
||||
})
|
||||
|
||||
// Extend artifact credentials if only key is provided
|
||||
if len(template.Outputs.Artifacts) > 0 {
|
||||
for j, artifact := range template.Outputs.Artifacts {
|
||||
if appendArtifactRepositoryConfigIfMissing(&artifact, namespaceConfig) {
|
||||
wf.Spec.Templates[i].Outputs.Artifacts[j] = artifact
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(template.Inputs.Artifacts) > 0 {
|
||||
for j, artifact := range template.Inputs.Artifacts {
|
||||
if appendArtifactRepositoryConfigIfMissing(&artifact, namespaceConfig) {
|
||||
wf.Spec.Templates[i].Inputs.Artifacts[j] = artifact
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Generate ENV vars from secret, if there is a container present in the workflow
|
||||
//Get template ENV vars, avoid over-writing them with secret values
|
||||
|
Reference in New Issue
Block a user