Skip to content

Commit

Permalink
+ add deploy variables replacing
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Komrakov committed Sep 14, 2015
1 parent 3462502 commit 740ebe8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ func RunScenario(res http.ResponseWriter, req *http.Request) {
token := mongo.GetToken(user)
client := service.GetGithubClient(token)
file, _ := service.GetFileContent(client, params["user"], params["repo"], params["sha"], config.DeployFile)
deploy, _ := service.GetYamlConfig(file)
string_file := service.ReplaceVariables(params, string(file))
deploy, _ := service.GetYamlConfig([]byte(string_file))
build := service.RunCommands(deploy, client, params["scenario"], mongo.CommitCredentials{mongo.RepositoryCredentials{params["user"], params["repo"]}, params["sha"]})

http.Redirect(res, req, "/repos/"+params["user"]+"/"+params["repo"]+"/build/"+build.Id.Hex(), http.StatusFound)
Expand Down

0 comments on commit 740ebe8

Please sign in to comment.