Skip to content

Commit

Permalink
Pass netrc to trusted clone images (#2163)
Browse files Browse the repository at this point in the history
closes #1975
  • Loading branch information
anbraten authored Aug 8, 2023
1 parent 3bdeb47 commit f02eaa1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pipeline/frontend/yaml/compiler/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ func (c *Compiler) Compile(conf *yaml_types.Workflow) (*backend_types.Config, er
stepType = backend_types.StepTypePlugin
}
step := c.createProcess(name, container, stepType)

// inject netrc if it's a trusted repo or a trusted clone-plugin
if c.trustedPipeline || (container.IsPlugin() && container.IsTrustedCloneImage()) {
for k, v := range c.cloneEnv {
step.Environment[k] = v
}
}

stage.Steps = append(stage.Steps, step)
}

Expand Down

0 comments on commit f02eaa1

Please sign in to comment.