-
Notifications
You must be signed in to change notification settings - Fork 29
Bug 1516458 - take rootURL as config and set TASKCLUSTER_ROOT_URL and TASKCLUSTER_PROXY_URL #135
Changes from all commits
0ff6a4c
309d2f5
8a28fab
4b043b1
4c39491
c9b74f5
7f4f1b1
38297d1
b8cc67a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -311,6 +311,7 @@ func (task *TaskRun) prepareCommand(index int) *CommandExecutionError { | |
| contents += "set " + envVar + "=" + envValue + "\r\n" | ||
| } | ||
| contents += "set TASK_ID=" + task.TaskID + "\r\n" | ||
| contents += "set TASKCLUSTER_ROOT_URL=" + config.RootURL + "\r\n" | ||
| contents += "cd \"" + taskContext.TaskDir + "\"" + "\r\n" | ||
|
|
||
| // Otherwise get the env from the previous command | ||
|
|
@@ -396,6 +397,20 @@ func (task *TaskRun) prepareCommand(index int) *CommandExecutionError { | |
| return nil | ||
| } | ||
|
|
||
| // Set an environment variable in each command. This can be called from a feature's | ||
| // NewTaskFeature method to set variables for the task. | ||
| func (task *TaskRun) setVariable(variable string, value string) error { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just a nit, not a required change. Nit: I would have probably called this Note, originally the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll leave that to you :) |
||
| for i := range task.Commands { | ||
| newEnv := []string{fmt.Sprintf("%s=%s", variable, value)} | ||
| combined, err := win32.MergeEnvLists(&task.Commands[i].Cmd.Env, &newEnv) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| task.Commands[i].Cmd.Env = *combined | ||
| } | ||
| return nil | ||
| } | ||
|
|
||
| // Only return critical errors | ||
| func purgeOldTasks() error { | ||
| if config.CleanUpTaskDirs { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.