mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-25 19:31:05 +00:00
Move cncd/pipeline/pipeline/ to pipeline/ (#347)
* Refactor: move cncd/pipeline/ to pipeline/ * Refactor: move pipeline/pipeline/ to pipeline/
This commit is contained in:
parent
a0d008e071
commit
e34daae0cf
114 changed files with 57 additions and 74 deletions
|
@ -25,10 +25,10 @@ import (
|
||||||
|
|
||||||
"google.golang.org/grpc/metadata"
|
"google.golang.org/grpc/metadata"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline"
|
"github.com/woodpecker-ci/woodpecker/pipeline"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/multipart"
|
"github.com/woodpecker-ci/woodpecker/pipeline/multipart"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/rpc"
|
"github.com/woodpecker-ci/woodpecker/pipeline/rpc"
|
||||||
|
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"github.com/tevino/abool"
|
"github.com/tevino/abool"
|
||||||
|
|
|
@ -13,16 +13,16 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/drone/envsubst"
|
"github.com/drone/envsubst"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline"
|
"github.com/woodpecker-ci/woodpecker/pipeline"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend/docker"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend/docker"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml/compiler"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml/compiler"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml/linter"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml/linter"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml/matrix"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml/matrix"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/interrupt"
|
"github.com/woodpecker-ci/woodpecker/pipeline/interrupt"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/multipart"
|
"github.com/woodpecker-ci/woodpecker/pipeline/multipart"
|
||||||
|
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
|
@ -28,8 +28,8 @@ import (
|
||||||
"google.golang.org/grpc/metadata"
|
"google.golang.org/grpc/metadata"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/agent"
|
"github.com/woodpecker-ci/woodpecker/agent"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend/docker"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend/docker"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/rpc"
|
"github.com/woodpecker-ci/woodpecker/pipeline/rpc"
|
||||||
|
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
|
@ -33,7 +33,7 @@ import (
|
||||||
"golang.org/x/crypto/acme/autocert"
|
"golang.org/x/crypto/acme/autocert"
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/rpc/proto"
|
"github.com/woodpecker-ci/woodpecker/pipeline/rpc/proto"
|
||||||
"github.com/woodpecker-ci/woodpecker/server"
|
"github.com/woodpecker-ci/woodpecker/server"
|
||||||
woodpeckerGrpcServer "github.com/woodpecker-ci/woodpecker/server/grpc"
|
woodpeckerGrpcServer "github.com/woodpecker-ci/woodpecker/server/grpc"
|
||||||
"github.com/woodpecker-ci/woodpecker/server/logging"
|
"github.com/woodpecker-ci/woodpecker/server/logging"
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
workspace:
|
|
||||||
base: /go
|
|
||||||
path: src/github.com/woodpecker-ci/woodpecker/cncd/pipeline
|
|
||||||
|
|
||||||
pipeline:
|
|
||||||
install:
|
|
||||||
image: golang:1.8
|
|
||||||
commands:
|
|
||||||
- go install github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipec
|
|
||||||
- go install github.com/woodpecker-ci/woodpecker/cncd/pipeline/piped
|
|
||||||
|
|
||||||
test:
|
|
||||||
image: golang:1.8
|
|
||||||
commands:
|
|
||||||
- go test -cover -timeout 30s github.com/woodpecker-ci/woodpecker/cncd/pipeline/...
|
|
2
cncd/pipeline/.gitignore
vendored
2
cncd/pipeline/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
*.txt
|
|
||||||
*.out
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
)
|
)
|
||||||
|
|
||||||
// returns a container configuration.
|
// returns a container configuration.
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
|
|
||||||
"docker.io/go-docker"
|
"docker.io/go-docker"
|
||||||
"docker.io/go-docker/api/types"
|
"docker.io/go-docker/api/types"
|
|
@ -3,7 +3,7 @@ package docker
|
||||||
// import (
|
// import (
|
||||||
// "context"
|
// "context"
|
||||||
//
|
//
|
||||||
// "github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
// "github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
// )
|
// )
|
||||||
//
|
//
|
||||||
// // Pool manages a pool of Docker clients.
|
// // Pool manages a pool of Docker clients.
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
)
|
)
|
||||||
|
|
||||||
type engine struct {
|
type engine struct {
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml"
|
||||||
|
|
||||||
libcompose "github.com/docker/libcompose/yaml"
|
libcompose "github.com/docker/libcompose/yaml"
|
||||||
)
|
)
|
|
@ -3,9 +3,9 @@ package compiler
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO(bradrydzewski) compiler should handle user-defined volumes from YAML
|
// TODO(bradrydzewski) compiler should handle user-defined volumes from YAML
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Compiler) createProcess(name string, container *yaml.Container, section string) *backend.Step {
|
func (c *Compiler) createProcess(name string, container *yaml.Container, section string) *backend.Step {
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Option configures a compiler option.
|
// Option configures a compiler option.
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestWithWorkspace(t *testing.T) {
|
func TestWithWorkspace(t *testing.T) {
|
|
@ -7,8 +7,8 @@ import (
|
||||||
|
|
||||||
doublestar "github.com/bmatcuk/doublestar/v4"
|
doublestar "github.com/bmatcuk/doublestar/v4"
|
||||||
libcompose "github.com/docker/libcompose/yaml"
|
libcompose "github.com/docker/libcompose/yaml"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml/types"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml/types"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,7 @@ package yaml
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend"
|
||||||
|
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
)
|
)
|
|
@ -3,7 +3,7 @@ package linter
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
|
@ -3,7 +3,7 @@ package linter
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml"
|
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLint(t *testing.T) {
|
func TestLint(t *testing.T) {
|
|
@ -1,8 +1,8 @@
|
||||||
package pipeline
|
package pipeline
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/multipart"
|
"github.com/woodpecker-ci/woodpecker/pipeline/multipart"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Logger handles the process logging.
|
// Logger handles the process logging.
|
|
@ -3,7 +3,7 @@ package pipeline
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Option configures a runtime option.
|
// Option configures a runtime option.
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Parse parses the pipeline config from an io.Reader.
|
// Parse parses the pipeline config from an io.Reader.
|
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/multipart"
|
"github.com/woodpecker-ci/woodpecker/pipeline/multipart"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/rpc/proto"
|
"github.com/woodpecker-ci/woodpecker/pipeline/rpc/proto"
|
||||||
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
|
@ -5,8 +5,8 @@ import (
|
||||||
// "encoding/json"
|
// "encoding/json"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
// "github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
// "github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/rpc/proto"
|
"github.com/woodpecker-ci/woodpecker/pipeline/rpc/proto"
|
||||||
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
|
@ -3,7 +3,7 @@ package rpc
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/backend"
|
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ErrCancelled signals the pipeine is cancelled.
|
// ErrCancelled signals the pipeine is cancelled.
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue