diff --git a/drone/convert/convert.go b/drone/convert/convert.go index d9afa7b..98159b0 100644 --- a/drone/convert/convert.go +++ b/drone/convert/convert.go @@ -1,19 +1,15 @@ package convert import ( - "bytes" - "io" "io/ioutil" - "os" - "github.com/drone/drone-yaml/yaml/converter" "github.com/urfave/cli" ) // Command exports the convert command. var Command = cli.Command{ Name: "convert", - Usage: "convert legacy format", + Usage: " convert legacy format", ArgsUsage: "", Action: convert, Flags: []cli.Flag{ @@ -30,20 +26,9 @@ func convert(c *cli.Context) error { path = ".drone.yml" } - raw, err := ioutil.ReadFile(path) + _, err := ioutil.ReadFile(path) if err != nil { return err } - - res, err := converter.Convert(raw, converter.Metadata{Filename: path}) - if err != nil { - return err - } - - if c.Bool("save") { - return ioutil.WriteFile(path, res, 0644) - } - - _, err = io.Copy(os.Stderr, bytes.NewReader(res)) return err } diff --git a/drone/exec/flags.go b/drone/exec/flags.go new file mode 100644 index 0000000..a10d782 --- /dev/null +++ b/drone/exec/flags.go @@ -0,0 +1,82 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Polyform License +// that can be found in the LICENSE file. + +package exec + +import ( + "github.com/drone-runners/drone-runner-docker/engine/compiler" + "github.com/drone/drone-go/drone" + "github.com/urfave/cli" +) + +// Flags maps +type Flags struct { + Build *drone.Build + Netrc *drone.Netrc + Repo *drone.Repo + Stage *drone.Stage + System *drone.System +} + +type execCommand struct { + *Flags + + Source string + Include []string + Exclude []string + Privileged []string + Networks []string + Volumes map[string]string + Environ map[string]string + Labels map[string]string + Secrets map[string]string + Resources compiler.Resources + Tmate compiler.Tmate + Clone bool + Config string + Pretty bool + Procs int64 + Debug bool + Trace bool + Dump bool + PublicKey string + PrivateKey string +} + +func mapOldToExecCommand(input *cli.Context) (returnVal *execCommand) { + returnVal = &execCommand{ + Flags: &Flags{ + Build: &drone.Build{ + Event: input.String("event"), + Ref: input.String("ref"), + Deploy: input.String("deploy-to"), + }, + Repo: &drone.Repo{ + Trusted: input.Bool("trusted"), + Timeout: int64(input.Int("timeout")), + Branch: input.String("branch"), + Name: input.String("name"), + }, + Stage: &drone.Stage{ + Name: input.String("pipeline"), + }, + Netrc: &drone.Netrc{ + Machine: input.String("netrc-machine"), + Login: input.String("netrc-username"), + Password: input.String("netrc-password"), + }, + System: &drone.System{ + Host: input.String("instance"), + }, + }, + Source: input.Args().First(), + Include: input.StringSlice("include"), + Exclude: input.StringSlice("exclude"), + Clone: input.Bool("clone"), + Networks: input.StringSlice("network"), + Privileged: input.StringSlice("privileged"), + } + + return returnVal +} diff --git a/drone/exec2/env.go b/drone/exec2/env.go new file mode 100644 index 0000000..69ae916 --- /dev/null +++ b/drone/exec2/env.go @@ -0,0 +1,65 @@ +package exec2 + +import ( + "os" + "strings" + + "github.com/urfave/cli" +) + +func getEnv(c *cli.Context) map[string]string { + env := prefixedEnviron( + os.Environ(), + ) + if c.IsSet("branch") { + v := c.String("branch") + env["DRONE_BRANCH"] = v + env["DRONE_COMMIT_BRANCH"] = v + env["DRONE_TARGET_BRANCH"] = v + } + if c.IsSet("event") { + v := c.String("event") + env["DRONE_EVENT"] = v + } + if c.IsSet("instance") { + v := c.String("instance") + env["DRONE_SYSTEM_HOST"] = v + env["DRONE_SYSTEM_HOSTNAME"] = v + } + if c.IsSet("ref") { + v := c.String("ref") + env["DRONE_COMMIT_REF"] = v + } + if c.IsSet("sha") { + v := c.String("sha") + env["DRONE_COMMIT_SHA"] = v + } + if c.IsSet("repo") { + v := c.String("repo") + env["DRONE_REPO"] = v + } + if c.IsSet("deploy-to") { + v := c.String("deploy-to") + env["DRONE_DEPLOY_TO"] = v + } + return env +} + +// helper function returns all environment variables +// prefixed with DRONE_. +func prefixedEnviron(environ []string) map[string]string { + envs := map[string]string{} + for _, env := range environ { + if !strings.HasPrefix(env, "DRONE_") { + continue + } + parts := strings.SplitN(env, "=", 2) + if len(parts) != 2 { + continue + } + key := parts[0] + val := parts[1] + envs[key] = val + } + return envs +} diff --git a/drone/exec2/exec.go b/drone/exec2/exec.go new file mode 100644 index 0000000..dbc6c68 --- /dev/null +++ b/drone/exec2/exec.go @@ -0,0 +1,366 @@ +package exec2 + +import ( + "context" + "encoding/json" + "fmt" + "io/ioutil" + "log" + "os" + "strings" + "time" + + "github.com/drone-runners/drone-runner-docker/engine" + "github.com/drone-runners/drone-runner-docker/engine/compiler" + "github.com/drone-runners/drone-runner-docker/engine/linter" + "github.com/drone-runners/drone-runner-docker/engine/resource" + + "github.com/drone/drone-go/drone" + "github.com/drone/envsubst" + "github.com/drone/runner-go/environ" + "github.com/drone/runner-go/environ/provider" + "github.com/drone/runner-go/logger" + "github.com/drone/runner-go/manifest" + "github.com/drone/runner-go/pipeline" + "github.com/drone/runner-go/pipeline/runtime" + "github.com/drone/runner-go/pipeline/streamer/console" + "github.com/drone/runner-go/registry" + "github.com/drone/runner-go/secret" + "github.com/drone/signal" + + "github.com/sirupsen/logrus" + "github.com/urfave/cli" +) + +var nocontext = context.Background() + +// Command exports the exec command. +var Command = cli.Command{ + Name: "exec2", + Usage: "execute a local build", + ArgsUsage: "[path/to/.drone.yml]", + Action: func(c *cli.Context) { + if err := exec(c); err != nil { + log.Fatalln(err) + } + }, + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "pipeline", + Usage: "Name of the pipeline to execute", + }, + cli.StringSliceFlag{ + Name: "include", + Usage: "Name of steps to include", + }, + cli.StringSliceFlag{ + Name: "exclude", + Usage: "Name of steps to exclude", + }, + cli.StringFlag{ + Name: "resume-at", + Usage: "Name of start to resume at", + }, + cli.BoolFlag{ + Name: "clone", + Usage: "enable the clone step", + }, + cli.BoolFlag{ + Name: "trusted", + Usage: "build is trusted", + }, + cli.DurationFlag{ + Name: "timeout", + Usage: "build timeout", + Value: time.Hour, + }, + cli.StringSliceFlag{ + Name: "volume", + Usage: "build volumes", + }, + cli.StringSliceFlag{ + Name: "network", + Usage: "external networks", + }, + cli.StringFlag{ + Name: "registry", + Usage: "registry file", + }, + cli.StringFlag{ + Name: "secret-file", + Usage: "secret file, define values that can be used with from_secret", + }, + cli.StringFlag{ + Name: "env-file", + Usage: "env file", + }, + cli.StringSliceFlag{ + Name: "privileged", + Usage: "privileged plugins", + Value: &cli.StringSlice{ + "plugins/docker", + "plugins/acr", + "plugins/ecr", + "plugins/gcr", + "plugins/heroku", + }, + }, + // netrc parameters + cli.StringFlag{ + Name: "netrc-username", + }, + cli.StringFlag{ + Name: "netrc-password", + }, + cli.StringFlag{ + Name: "netrc-machine", + }, + // trigger parameters + cli.StringFlag{ + Name: "branch", + Usage: "branch name", + }, + cli.StringFlag{ + Name: "event", + Usage: "build event name (push, pull_request, etc)", + }, + cli.StringFlag{ + Name: "instance", + Usage: "instance hostname (e.g. drone.company.com)", + }, + // cli.StringFlag{ + // Name: "ref", + // Usage: "git reference", + // }, NOT NEEDED + // cli.StringFlag{ + // Name: "sha", + // Usage: "git sha", + // }, + cli.StringFlag{ + Name: "repo", + Usage: "git repository name (e.g. octocat/hello-world)", + }, + cli.StringFlag{ + Name: "deploy-to", + Usage: "deployment target (e.g. production)", + }, + }, +} + +func exec(cliContext *cli.Context) error { + // lets do our mapping from CLI flags to an execCommand struct + commy := mapOldToExecCommand(cliContext) + + rawsource, err := ioutil.ReadFile(commy.Source) + if err != nil { + return err + } + envs := environ.Combine( + getEnv(cliContext), + environ.System(commy.System), + environ.Repo(commy.Repo), + environ.Build(commy.Build), + environ.Stage(commy.Stage), + environ.Link(commy.Repo, commy.Build, commy.System), + commy.Build.Params, + ) + + // string substitution function ensures that string + // replacement variables are escaped and quoted if they + // contain newlines. + subf := func(k string) string { + v := envs[k] + if strings.Contains(v, "\n") { + v = fmt.Sprintf("%q", v) + } + return v + } + + // evaluates string replacement expressions and returns an + // update configuration. + config, err := envsubst.Eval(string(rawsource), subf) + if err != nil { + return err + } + + // parse and lint the configuration. + manifest, err := manifest.ParseString(config) + if err != nil { + return err + } + + // a configuration can contain multiple pipelines. + // get a specific pipeline resource for execution. + if commy.Stage.Name == "" { + fmt.Println("No stage specified, assuming 'default'") + } + + res, err := resource.Lookup(commy.Stage.Name, manifest) + if err != nil { + return fmt.Errorf("Stage '%s' not found in build file : %s", commy.Stage.Name, err) + } + + // lint the pipeline and return an error if any + // linting rules are broken + lint := linter.New() + err = lint.Lint(res, commy.Repo) + if err != nil { + return err + } + + // compile the pipeline to an intermediate representation. + comp := &compiler.Compiler{ + Environ: provider.Static(commy.Environ), + Labels: commy.Labels, + Resources: commy.Resources, + Tmate: commy.Tmate, + Privileged: append(commy.Privileged, compiler.Privileged...), + Networks: commy.Networks, + Volumes: commy.Volumes, + Secret: secret.StaticVars(commy.Secrets), + Registry: registry.Combine( + registry.File(commy.Config), + ), + } + + // when running a build locally cloning is always + // disabled in favor of mounting the source code + // from the current working directory. + if !commy.Clone { + comp.Mount, _ = os.Getwd() + } + + args := runtime.CompilerArgs{ + Pipeline: res, + Manifest: manifest, + Build: commy.Build, + Netrc: commy.Netrc, + Repo: commy.Repo, + Stage: commy.Stage, + System: commy.System, + } + spec := comp.Compile(nocontext, args).(*engine.Spec) + + // include only steps that are in the include list, + // if the list in non-empty. + if len(commy.Include) > 0 { + I: + for _, step := range spec.Steps { + if step.Name == "clone" { + continue + } + for _, name := range commy.Include { + if step.Name == name { + continue I + } + } + step.RunPolicy = runtime.RunNever + } + } + // exclude steps that are in the exclude list, if the list in non-empty. + if len(commy.Exclude) > 0 { + E: + for _, step := range spec.Steps { + if step.Name == "clone" { + continue + } + for _, name := range commy.Exclude { + if step.Name == name { + step.RunPolicy = runtime.RunNever + continue E + } + } + } + } + // resume at a specific step + if cliContext.String("resume-at") != "" { + for _, step := range spec.Steps { + if step.Name == cliContext.String("resume-at") { + break + } + if step.Name == "clone" { + continue + } + for _, name := range commy.Exclude { + if step.Name == name { + step.RunPolicy = runtime.RunNever + continue + } + } + } + } + // create a step object for each pipeline step. + for _, step := range spec.Steps { + if step.RunPolicy == runtime.RunNever { + continue + } + commy.Stage.Steps = append(commy.Stage.Steps, &drone.Step{ + StageID: commy.Stage.ID, + Number: len(commy.Stage.Steps) + 1, + Name: step.Name, + Status: drone.StatusPending, + ErrIgnore: step.ErrPolicy == runtime.ErrIgnore, + }) + } + + // configures the pipeline timeout. + timeout := time.Duration(commy.Repo.Timeout) * time.Minute + ctx, cancel := context.WithTimeout(nocontext, timeout) + defer cancel() + + // listen for operating system signals and cancel execution when received. + ctx = signal.WithContextFunc(ctx, func() { + println("received signal, terminating process") + cancel() + }) + + state := &pipeline.State{ + Build: commy.Build, + Stage: commy.Stage, + Repo: commy.Repo, + System: commy.System, + } + + // enable debug logging + logrus.SetLevel(logrus.WarnLevel) + if commy.Debug { + logrus.SetLevel(logrus.DebugLevel) + } + if commy.Trace { + logrus.SetLevel(logrus.TraceLevel) + } + logger.Default = logger.Logrus( + logrus.NewEntry( + logrus.StandardLogger(), + ), + ) + + engine, err := engine.NewEnv(engine.Opts{}) + if err != nil { + return err + } + + err = runtime.NewExecer( + pipeline.NopReporter(), + console.New(commy.Pretty), + pipeline.NopUploader(), + engine, + commy.Procs, + ).Exec(ctx, spec, state) + + if err != nil { + dump(state) + return err + } + switch state.Stage.Status { + case drone.StatusError, drone.StatusFailing, drone.StatusKilled: + os.Exit(1) + } + return nil +} + +func dump(v interface{}) { + enc := json.NewEncoder(os.Stdout) + enc.SetIndent("", " ") + _ = enc.Encode(v) +} diff --git a/drone/exec2/flags.go b/drone/exec2/flags.go new file mode 100644 index 0000000..47a6502 --- /dev/null +++ b/drone/exec2/flags.go @@ -0,0 +1,111 @@ +// Copyright 2019 Drone.IO Inc. All rights reserved. +// Use of this source code is governed by the Polyform License +// that can be found in the LICENSE file. + +package exec2 + +import ( + "strings" + + "github.com/drone-runners/drone-runner-docker/engine/compiler" + "github.com/drone/drone-go/drone" + "github.com/joho/godotenv" + "github.com/urfave/cli" +) + +// Flags maps +type Flags struct { + Build *drone.Build + Netrc *drone.Netrc + Repo *drone.Repo + Stage *drone.Stage + System *drone.System +} + +type execCommand struct { + *Flags + + Source string + Include []string + Exclude []string + Privileged []string + Networks []string + Volumes map[string]string + Environ map[string]string + Labels map[string]string + Secrets map[string]string + Resources compiler.Resources + Tmate compiler.Tmate + Clone bool + Config string + Pretty bool + Procs int64 + Debug bool + Trace bool + Dump bool + PublicKey string + PrivateKey string +} + +func mapOldToExecCommand(input *cli.Context) (returnVal *execCommand) { + returnVal = &execCommand{ + Flags: &Flags{ + Build: &drone.Build{ + Event: input.String("event"), + Ref: input.String("ref"), + Deploy: input.String("deploy-to"), + Target: input.String("branch"), + }, + Repo: &drone.Repo{ + Trusted: input.Bool("trusted"), + Timeout: int64(input.Duration("timeout").Seconds()), + Branch: input.String("branch"), + Name: input.String("name"), + }, + Stage: &drone.Stage{ + Name: input.String("pipeline"), + }, + Netrc: &drone.Netrc{ + Machine: input.String("netrc-machine"), + Login: input.String("netrc-username"), + Password: input.String("netrc-password"), + }, + System: &drone.System{ + Host: input.String("instance"), + }, + }, + Source: input.Args().First(), + Include: input.StringSlice("include"), + Exclude: input.StringSlice("exclude"), + Clone: input.Bool("clone"), + Networks: input.StringSlice("network"), + Environ: readParams(input.String("env-file")), + Volumes: withVolumeSlice(input.StringSlice("volume")), + Secrets: readParams(input.String("secrets")), + Config: input.String("registry"), + Privileged: input.StringSlice("privileged"), + } + + return returnVal +} + +// WithVolumeSlice is a transform function that adds a set of global volumes to the container that are defined in --volume=host:container format. +func withVolumeSlice(volumes []string) (to map[string]string) { + to = map[string]string{} + for _, s := range volumes { + parts := strings.Split(s, ":") + if len(parts) != 2 { + continue + } + key := parts[0] + val := parts[1] + to[key] = val + } + return to +} + +// helper function reads secrets from a key-value file. +func readParams(path string) map[string]string { + data, _ := godotenv.Read(path) + return data +} diff --git a/drone/lint/lint.go b/drone/lint/lint.go index 1c3bcfa..35bcd36 100644 --- a/drone/lint/lint.go +++ b/drone/lint/lint.go @@ -1,15 +1,22 @@ package lint import ( - "github.com/drone/drone-yaml/yaml" - "github.com/drone/drone-yaml/yaml/linter" + "fmt" + "io/ioutil" + "strings" + + "github.com/drone-runners/drone-runner-docker/engine/linter" + "github.com/drone-runners/drone-runner-docker/engine/resource" + "github.com/drone/drone-go/drone" + "github.com/drone/envsubst" + "github.com/drone/runner-go/manifest" "github.com/urfave/cli" ) // Command exports the linter command. var Command = cli.Command{ Name: "lint", - Usage: "lint the yaml file", + Usage: "lint the yaml file, checks for yaml errors", ArgsUsage: "", Action: lint, Flags: []cli.Flag{ @@ -20,22 +27,78 @@ var Command = cli.Command{ }, } +type Flags struct { + Build drone.Build + Netrc drone.Netrc + Repo drone.Repo + Stage drone.Stage + System drone.System +} + func lint(c *cli.Context) error { + f := new(Flags) + f.Repo.Trusted = c.Bool("trusted") + var envs map[string]string + path := c.Args().First() if path == "" { path = ".drone.yml" } - manifest, err := yaml.ParseFile(path) + rawSource, err := ioutil.ReadFile(path) if err != nil { return err } - - for _, resource := range manifest.Resources { - if err := linter.Lint(resource, c.Bool("trusted")); err != nil { - return err + // string substitution function ensures that string replacement variables are escaped and quoted if they contain newlines. + subf := func(k string) string { + v := envs[k] + if strings.Contains(v, "\n") { + v = fmt.Sprintf("%q", v) + } + return v + } + // evaluates string replacement expressions and returns an update configuration. + config, err := envsubst.Eval(string(rawSource), subf) + if err != nil { + return err + } + // parse into manifests + inputManifests, err := manifest.ParseString(config) + if err != nil { + return err + } + for _, iter := range inputManifests.Resources { + if iter.GetType() == "docker" { + resource, err := resource.Lookup(iter.GetName(), inputManifests) + if err != nil { + return err + } + // lint the resource and return an error if any linting rules are broken + lint := linter.New() + err = lint.Lint(resource, &f.Repo) + if err != nil { + return err + } + fmt.Printf("%v\n", iter) + } + } + // now we can check the pipeline dependencies + // get a list of all the pipelines + allStages := map[string]struct{}{} + for _, iter := range inputManifests.Resources { + allStages[iter.GetName()] = struct{}{} + } + // we need to parse the file again into raw resources to access the dependencies + inputRawResources, err := manifest.ParseRawFile(path) + if err != nil { + return err + } + for _, iter := range inputRawResources { + for _, dep := range iter.Deps { + if _, ok := allStages[dep]; !ok { + return fmt.Errorf("Pipeline stage '%s' declares invalid dependency '%s'", iter.Name, dep) + } } } - return nil } diff --git a/drone/main.go b/drone/main.go index 36cf717..6f170ff 100644 --- a/drone/main.go +++ b/drone/main.go @@ -10,6 +10,7 @@ import ( "github.com/drone/drone-cli/drone/cron" "github.com/drone/drone-cli/drone/encrypt" "github.com/drone/drone-cli/drone/exec" + "github.com/drone/drone-cli/drone/exec2" "github.com/drone/drone-cli/drone/format" "github.com/drone/drone-cli/drone/info" "github.com/drone/drone-cli/drone/jsonnet" @@ -81,6 +82,7 @@ func main() { log.Command, encrypt.Command, exec.Command, + exec2.Command, info.Command, repo.Command, user.Command, diff --git a/drone/sign/sign.go b/drone/sign/sign.go index 7c9728c..b4991f6 100644 --- a/drone/sign/sign.go +++ b/drone/sign/sign.go @@ -1,11 +1,15 @@ package sign import ( + "bufio" + "bytes" "fmt" + "io" "io/ioutil" + "strings" + "github.com/buildkite/yaml" "github.com/drone/drone-cli/drone/internal" - "github.com/drone/drone-yaml/yaml/signer" "github.com/urfave/cli" ) @@ -55,9 +59,131 @@ func format(c *cli.Context) error { return nil } - data, err = signer.WriteTo(data, hmac) + data, err = writeTo(data, hmac) if err != nil { return err } return ioutil.WriteFile(path, data, 0644) } + +// Resource enums. +const ( + KindCron = "cron" + KindPipeline = "pipeline" + KindRegistry = "registry" + KindSecret = "secret" + KindSignature = "signature" +) + +type ( + // Manifest is a collection of Drone resources. + Manifest struct { + Resources []Resource + } + + // Resource represents a Drone resource. + Resource interface { + // GetVersion returns the resource version. + GetVersion() string + + // GetKind returns the resource kind. + GetKind() string + } + + // RawResource is a raw encoded resource with the + // resource kind and type extracted. + RawResource struct { + Version string + Kind string + Type string + Data []byte `yaml:"-"` + } + + resource struct { + Version string + Kind string `json:"kind"` + Type string `json:"type"` + } +) + +func writeTo(data []byte, hmac string) ([]byte, error) { + res, err := parseRawBytes(data) + return upsert(res, hmac), err +} + +func parseRawBytes(b []byte) ([]*RawResource, error) { + return parseRaw( + bytes.NewReader(b), + ) +} + +func parseRaw(r io.Reader) ([]*RawResource, error) { + const newline = '\n' + var resources []*RawResource + var resource *RawResource + + scanner := bufio.NewScanner(r) + for scanner.Scan() { + line := scanner.Text() + if isSeparator(line) { + resource = nil + } + if resource == nil { + resource = &RawResource{} + resources = append(resources, resource) + } + if isSeparator(line) { + continue + } + if isTerminator(line) { + break + } + if scanner.Err() == io.EOF { + break + } + resource.Data = append( + resource.Data, + line..., + ) + resource.Data = append( + resource.Data, + newline, + ) + } + for _, resource := range resources { + err := yaml.Unmarshal(resource.Data, resource) + if err != nil { + return nil, err + } + } + return resources, nil +} + +func upsert(res []*RawResource, hmac string) []byte { + var buf bytes.Buffer + for _, r := range res { + if r.Kind != KindSignature { + buf.WriteString("---") + buf.WriteByte('\n') + buf.Write(r.Data) + } + } + buf.WriteString("---") + buf.WriteByte('\n') + buf.WriteString("kind: signature") + buf.WriteByte('\n') + buf.WriteString("hmac: " + hmac) + buf.WriteByte('\n') + buf.WriteByte('\n') + buf.WriteString("...") + buf.WriteByte('\n') + return buf.Bytes() +} + +func isSeparator(s string) bool { + return strings.HasPrefix(s, "---") +} + +func isTerminator(s string) bool { + return strings.HasPrefix(s, "...") +} diff --git a/go.mod b/go.mod index 99f9b37..49606db 100644 --- a/go.mod +++ b/go.mod @@ -1,17 +1,19 @@ module github.com/drone/drone-cli -go 1.16 +go 1.17 replace github.com/docker/docker => github.com/docker/engine v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+incompatible require ( - github.com/containerd/containerd v1.5.8 // indirect + github.com/buildkite/yaml v2.1.0+incompatible github.com/docker/go-units v0.4.0 - github.com/drone/drone-go v1.7.0 - github.com/drone/drone-runtime v1.1.1-0.20200623162453-61e33e2cab5d - github.com/drone/drone-yaml v0.0.0-20190729072335-70fa398b3560 + github.com/drone-runners/drone-runner-docker v1.8.0 + github.com/drone/drone-go v1.7.1 + github.com/drone/drone-runtime v1.1.0 + github.com/drone/drone-yaml v1.2.3 github.com/drone/envsubst v1.0.3 github.com/drone/funcmap v0.0.0-20190918184546-d4ef6e88376d + github.com/drone/runner-go v1.12.0 github.com/drone/signal v1.0.0 github.com/fatih/color v1.9.0 github.com/ghodss/yaml v1.0.0 @@ -20,11 +22,54 @@ require ( github.com/joho/godotenv v1.3.0 github.com/mattn/go-colorable v0.1.4 github.com/mattn/go-isatty v0.0.11 - github.com/opencontainers/image-spec v1.0.2 // indirect github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 - github.com/stretchr/testify v1.6.1 + github.com/sirupsen/logrus v1.8.1 + github.com/stretchr/testify v1.7.0 github.com/urfave/cli v1.22.2 go.starlark.net v0.0.0-20201118183435-e55f603d8c79 - golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 + golang.org/x/net v0.0.0-20211209124913-491a49abca63 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d ) + +require ( + github.com/gorilla/mux v1.8.0 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + golang.org/x/text v0.3.7 // indirect + gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect +) + +require ( + docker.io/go-docker v1.0.0 // indirect + github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e // indirect + github.com/Microsoft/go-winio v0.4.17 // indirect + github.com/bmatcuk/doublestar v1.1.1 // indirect + github.com/containerd/containerd v1.5.9 // indirect + github.com/coreos/go-semver v0.3.0 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9 // indirect + github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/docker v1.13.1 // indirect + github.com/docker/go-connections v0.3.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-multierror v1.0.0 // indirect + github.com/natessilva/dag v0.0.0-20180124060714-7194b8dcc5c4 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/russross/blackfriday/v2 v2.0.1 // indirect + github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect + github.com/vinzenz/yaml v0.0.0-20170920082545-91409cdd725d // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect + golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e // indirect + google.golang.org/appengine v1.6.6 // indirect + google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a // indirect + google.golang.org/grpc v1.33.2 // indirect + google.golang.org/protobuf v1.27.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect +) diff --git a/go.sum b/go.sum index 8c379ed..f326d87 100644 --- a/go.sum +++ b/go.sum @@ -22,7 +22,9 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +docker.io/go-docker v1.0.0 h1:VdXS/aNYQxyA9wdLD5z8Q8Ro688/hG8HzKxYVEVbE6s= docker.io/go-docker v1.0.0/go.mod h1:7tiAn5a0LFmjbPDbyTPOaTTOuG1ZRNXdPA6RvKY+fpY= +github.com/99designs/basicauth-go v0.0.0-20160802081356-2a93ba0f464d/go.mod h1:3cARGAK9CfW3HoxCy1a0G4TKrdiKke8ftOMEOHyySYs= github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e h1:rl2Aq4ZODqTDkeSqQBy+fzpZPamacO1Srp8zq7jf2Sc= github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e/go.mod h1:Xa6lInWHNQnuWoF0YPSsx+INFA9qk7/7pTjwb3PInkY= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -141,8 +143,8 @@ github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7 github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.8 h1:NmkCC1/QxyZFBny8JogwLpOy2f+VEbO/f6bV2Mqtwuw= -github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= +github.com/containerd/containerd v1.5.9 h1:rs6Xg1gtIxaeyG+Smsb/0xaSDu1VgFhOCKBXxMxbsF4= +github.com/containerd/containerd v1.5.9/go.mod h1:fvQqCfadDGga5HZyn3j4+dx56qj2I9YwBrlSdalvJYQ= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -199,6 +201,7 @@ github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmeka github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -212,6 +215,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= @@ -220,6 +224,8 @@ github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjI github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9 h1:74lLNRzvsdIlkTgfDSMuaPjBr4cf6k7pwQQANm/yLKU= +github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9/go.mod h1:GgB8SF9nRG+GqaDtLcwJZsQFhcogVCJ79j4EdT0c2V4= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -244,17 +250,23 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/drone/drone-go v1.7.0 h1:oEFWVcagBmAkVuFBpBq9lImZX1caDM+zRsmC4O1vXgQ= -github.com/drone/drone-go v1.7.0/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg= -github.com/drone/drone-runtime v1.0.7-0.20190729070836-38f28a11afe8/go.mod h1:+osgwGADc/nyl40J0fdsf8Z09bgcBZXvXXnLOY48zYs= -github.com/drone/drone-runtime v1.1.1-0.20200623162453-61e33e2cab5d h1:P5HI/Y9hARTZ3F3EKs0kYijhjXZWQRQHYn1neTi0pWM= -github.com/drone/drone-runtime v1.1.1-0.20200623162453-61e33e2cab5d/go.mod h1:4/2QToW5+HGD0y1sTw7X35W1f7YINS14UfDY4isggT8= -github.com/drone/drone-yaml v0.0.0-20190729072335-70fa398b3560 h1:3QL4NnDpGtaXpgI9eNd6N2k5WK8W388CzD67ZTuuZQg= -github.com/drone/drone-yaml v0.0.0-20190729072335-70fa398b3560/go.mod h1:rCLISp/rqZ50s6G4nKsm971tRSzolxzqqXfgjDqPYoE= +github.com/drone-runners/drone-runner-docker v1.8.0 h1:cNjEAxAR/crqfcRyqoumPaHdulfUdj5x2aB2oArvBno= +github.com/drone-runners/drone-runner-docker v1.8.0/go.mod h1:Jdm+apC9XcDGlgdXH+wHjegwqW2oMH9+RR6TfAOu9D8= +github.com/drone/drone-go v1.7.1 h1:ZX+3Rs8YHUSUQ5mkuMLmm1zr1ttiiE2YGNxF3AnyDKw= +github.com/drone/drone-go v1.7.1/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg= +github.com/drone/drone-runtime v1.0.7-0.20190729202838-87c84080f4a1/go.mod h1:+osgwGADc/nyl40J0fdsf8Z09bgcBZXvXXnLOY48zYs= +github.com/drone/drone-runtime v1.1.0 h1:IsKbwiLY6+ViNBzX0F8PERJVZZcEJm9rgxEh3uZP5IE= +github.com/drone/drone-runtime v1.1.0/go.mod h1:+osgwGADc/nyl40J0fdsf8Z09bgcBZXvXXnLOY48zYs= +github.com/drone/drone-yaml v1.2.3 h1:SWzLmzr8ARhbtw1WsVDENa8WFY2Pi9l0FVMfafVUWz8= +github.com/drone/drone-yaml v1.2.3/go.mod h1:QsqliFK8nG04AHFN9tTn9XJomRBQHD4wcejWW1uz/10= +github.com/drone/envsubst v1.0.2/go.mod h1:bkZbnc/2vh1M12Ecn7EYScpI4YGYU0etwLJICOWi8Z0= github.com/drone/envsubst v1.0.3 h1:PCIBwNDYjs50AsLZPYdfhSATKaRg/FJmDc2D6+C2x8g= github.com/drone/envsubst v1.0.3/go.mod h1:N2jZmlMufstn1KEqvbHjw40h1KyTmnVzHcSc9bFiJ2g= github.com/drone/funcmap v0.0.0-20190918184546-d4ef6e88376d h1:/IO7UVVu191Jc0DajV4cDVoO+91cuppvgxg2MZl+AXI= github.com/drone/funcmap v0.0.0-20190918184546-d4ef6e88376d/go.mod h1:Hph0/pT6ZxbujnE1Z6/08p5I0XXuOsppqF6NQlGOK0E= +github.com/drone/runner-go v1.11.0/go.mod h1:vu4pPPYDoeN6vdYQAY01GGGsAIW4aLganJNaa8Fx8zE= +github.com/drone/runner-go v1.12.0 h1:zUjDj9ylsJ4n4Mvy4znddq/Z4EBzcUXzTltpzokKtgs= +github.com/drone/runner-go v1.12.0/go.mod h1:vu4pPPYDoeN6vdYQAY01GGGsAIW4aLganJNaa8Fx8zE= github.com/drone/signal v1.0.0 h1:NrnM2M/4yAuU/tXs6RP1a1ZfxnaHwYkd0kJurA1p6uI= github.com/drone/signal v1.0.0/go.mod h1:S8t92eFT0g4WUgEc/LxG+LCuiskpMNsG0ajAMGnyZpc= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -337,8 +349,9 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -374,8 +387,9 @@ github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3i github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -387,8 +401,10 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -418,6 +434,7 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -430,12 +447,12 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -476,6 +493,8 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+ github.com/natessilva/dag v0.0.0-20180124060714-7194b8dcc5c4 h1:dnMxwus89s86tI8rcGVp2HwZzlz7c5o92VOy7dSckBQ= github.com/natessilva/dag v0.0.0-20180124060714-7194b8dcc5c4/go.mod h1:cojhOHk1gbMeklOyDP2oKKLftefXoJreOQGOrXk+Z38= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -498,7 +517,6 @@ github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go. github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= @@ -608,8 +626,9 @@ github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRci github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -665,6 +684,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -735,8 +755,9 @@ golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= +golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -752,8 +773,9 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -816,16 +838,20 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 h1:dXfMednGJh/SUUFjTLsWJz3P+TQt9qnR11GgeI3vWKs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e h1:XMgFehsDnnLGtjvjOfqWSUzt0alpTR1RSEuznObga2c= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -929,6 +955,7 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= @@ -951,8 +978,9 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -973,8 +1001,9 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=