Skip to content

Commit

Permalink
refactor: pull go-vela packages from server and worker
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockopp committed Nov 2, 2021
1 parent d1721df commit 0aa3e90
Show file tree
Hide file tree
Showing 71 changed files with 379 additions and 114 deletions.
2 changes: 1 addition & 1 deletion action/build/cancel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/build/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/build/restart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/build/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/deployment/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"reflect"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/sdk-go/vela"
"github.com/go-vela/server/mock/server"
"github.com/go-vela/types/raw"
)

Expand Down
2 changes: 1 addition & 1 deletion action/deployment/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/deployment/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/hook/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/hook/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/go-vela/cli/test"
"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/urfave/cli/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion action/log/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/log/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/pipeline/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
10 changes: 5 additions & 5 deletions action/pipeline/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"path/filepath"

"github.com/go-vela/cli/version"
"github.com/go-vela/compiler/compiler"
"github.com/go-vela/pkg-executor/executor"
"github.com/go-vela/pkg-runtime/runtime"
"github.com/go-vela/server/compiler"
"github.com/go-vela/types/constants"
"github.com/go-vela/types/library"
"github.com/go-vela/worker/executor"
"github.com/go-vela/worker/runtime"

"github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -91,7 +91,7 @@ func (c *Config) Exec(client compiler.Engine) error {

// setup the runtime
//
// https://pkg.go.dev/github.com/go-vela/pkg-runtime/runtime?tab=doc#New
// https://pkg.go.dev/github.com/go-vela/worker/runtime?tab=doc#New
_runtime, err := runtime.New(&runtime.Setup{
Driver: constants.DriverDocker,
HostVolumes: c.Volumes,
Expand All @@ -104,7 +104,7 @@ func (c *Config) Exec(client compiler.Engine) error {

// setup the executor
//
// https://godoc.org/github.com/go-vela/pkg-executor/executor#New
// https://godoc.org/github.com/go-vela/worker/executor#New
_executor, err := executor.New(&executor.Setup{
Driver: constants.DriverLocal,
Runtime: _runtime,
Expand Down
2 changes: 1 addition & 1 deletion action/pipeline/expand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
6 changes: 3 additions & 3 deletions action/pipeline/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/go-vela/types/library"
"github.com/go-vela/types/yaml"

"github.com/go-vela/compiler/compiler"
"github.com/go-vela/server/compiler"

"github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -148,14 +148,14 @@ func (c *Config) ValidateLocal(client compiler.Engine) error {

if len(p.Stages) > 0 {
// inject the templates into the stages
p.Stages, p.Secrets, p.Services, err = client.ExpandStages(p, templates)
p.Stages, p.Secrets, p.Services, _, err = client.ExpandStages(p, templates)
if err != nil {
return err
}
}

// inject the templates into the steps
p.Steps, p.Secrets, p.Services, err = client.ExpandSteps(p, templates)
p.Steps, p.Secrets, p.Services, _, err = client.ExpandSteps(p, templates)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions action/pipeline/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"path"
"testing"

"github.com/go-vela/compiler/compiler/native"
"github.com/go-vela/mock/server"
"github.com/go-vela/sdk-go/vela"
"github.com/go-vela/server/compiler/native"
"github.com/go-vela/server/mock/server"

"github.com/urfave/cli/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion action/pipeline/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/repo/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/repo/chown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/repo/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/repo/remove_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/repo/repair_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/repo/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/repo/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/secret/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/secret/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/secret/remove_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/secret/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/secret/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/service/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/service/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/step/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion action/step/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/go-vela/sdk-go/vela"
)
Expand Down
2 changes: 1 addition & 1 deletion command/build/cancel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/go-vela/cli/test"
"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/urfave/cli/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion command/build/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/go-vela/cli/test"
"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/urfave/cli/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion command/build/restart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/go-vela/cli/test"
"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/urfave/cli/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion command/build/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/go-vela/cli/test"
"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/urfave/cli/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion command/deployment/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/go-vela/cli/test"
"github.com/go-vela/mock/server"
"github.com/go-vela/server/mock/server"

"github.com/urfave/cli/v2"
)
Expand Down
Loading

0 comments on commit 0aa3e90

Please sign in to comment.