mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
Copy-paste fixes
This commit is contained in:
parent
b7b8db7cfd
commit
69d1c4c9b7
@ -227,7 +227,7 @@ func (t *task) updateRepository() error {
|
||||
cmd.Dir = util.Config.TmpPath
|
||||
|
||||
gitSshCommand := "ssh -o StrictHostKeyChecking=no -i " + t.repository.SshKey.GetPath()
|
||||
cmd.Env = t.envVars(util.Config.TmpPath, util.Config.TmpPath, gitSshCommand)
|
||||
cmd.Env = t.envVars(util.Config.TmpPath, util.Config.TmpPath, &gitSshCommand)
|
||||
|
||||
repoURL, repoTag := t.repository.GitUrl, "master"
|
||||
if split := strings.Split(repoURL, "#"); len(split) > 1 {
|
||||
@ -263,7 +263,7 @@ func (t *task) runGalaxy() error {
|
||||
cmd.Dir = util.Config.TmpPath + "/repository_" + strconv.Itoa(t.repository.ID)
|
||||
|
||||
gitSshCommand := "ssh -o StrictHostKeyChecking=no -i " + t.repository.SshKey.GetPath()
|
||||
cmd.Env = t.envVars(util.Config.TmpPath, cmd.Dir, gitSshCommand)
|
||||
cmd.Env = t.envVars(util.Config.TmpPath, cmd.Dir, &gitSshCommand)
|
||||
|
||||
if _, err := os.Stat(cmd.Dir + "/roles/requirements.yml"); err != nil {
|
||||
return nil
|
||||
@ -325,8 +325,8 @@ func (t *task) runPlaybook() error {
|
||||
|
||||
func (t *task) envVars(home string, pwd string, gitSshCommand *string) []string {
|
||||
env := os.Environ()
|
||||
env = append(env, fmt.Sprintf("HOME=%s", util.Config.TmpPath))
|
||||
env = append(env, fmt.Sprintf("PWD=%s", cmd.Dir))
|
||||
env = append(env, fmt.Sprintf("HOME=%s", home))
|
||||
env = append(env, fmt.Sprintf("PWD=%s", pwd))
|
||||
env = append(env, fmt.Sprintln("PYTHONUNBUFFERED=1"))
|
||||
//env = append(env, fmt.Sprintln("GIT_FLUSH=1"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user