Skip to content

Commit

Permalink
Merge pull request #2386 from hashicorp/f-go-getter
Browse files Browse the repository at this point in the history
Update go-getter and add support for git and hg
  • Loading branch information
dadgar committed Mar 1, 2017
2 parents 1b278fb + 2a683cd commit 5ff4bc7
Show file tree
Hide file tree
Showing 20 changed files with 908 additions and 55 deletions.
2 changes: 1 addition & 1 deletion client/getter/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
lock sync.Mutex

// supported is the set of download schemes supported by Nomad
supported = []string{"http", "https", "s3"}
supported = []string{"http", "https", "s3", "hg", "git"}
)

// getClient returns a client that is suitable for Nomad downloading artifacts.
Expand Down
1 change: 1 addition & 0 deletions client/task_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ func (r *TaskRunner) prestart(resultCh chan bool) {
for _, artifact := range r.task.Artifacts {
if err := getter.GetArtifact(r.getTaskEnv(), artifact, r.taskDir.Dir); err != nil {
wrapped := fmt.Errorf("failed to download artifact %q: %v", artifact.GetterSource, err)
r.logger.Printf("[DEBUG] client: %v", wrapped)
r.setState(structs.TaskStatePending,
structs.NewTaskEvent(structs.TaskArtifactDownloadFailed).SetDownloadError(wrapped))
r.restartTracker.SetStartError(structs.NewRecoverableError(wrapped, true))
Expand Down
20 changes: 20 additions & 0 deletions vendor/github.com/bgentry/go-netrc/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5ff4bc7

Please sign in to comment.