mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 12:30:41 +01:00
feat(secrets): send secrets to bash and ansible
This commit is contained in:
parent
46048ef770
commit
2db419357e
@ -183,6 +183,10 @@ func (t *LocalJob) getBashArgs(username string, incomingVersion *string) (args [
|
||||
args = append(args, fmt.Sprintf("%s=%s", name, value))
|
||||
}
|
||||
|
||||
for _, secret := range t.Environment.Secrets {
|
||||
args = append(args, fmt.Sprintf("%s=%s", secret.Name, secret.Secret))
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@ -306,6 +310,10 @@ func (t *LocalJob) getPlaybookArgs(username string, incomingVersion *string) (ar
|
||||
args = append(args, "--extra-vars", extraVars)
|
||||
}
|
||||
|
||||
for _, secret := range t.Environment.Secrets {
|
||||
args = append(args, "--extra-vars", fmt.Sprintf("%s=%s", secret.Name, secret.Secret))
|
||||
}
|
||||
|
||||
var templateExtraArgs []string
|
||||
if t.Template.Arguments != nil {
|
||||
err = json.Unmarshal([]byte(*t.Template.Arguments), &templateExtraArgs)
|
||||
|
Loading…
Reference in New Issue
Block a user