Move package store/ to server/store/ (#341)

* Refactor: move store/ to server/store/

* fix pipeline for moved tests

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Jacob Floyd 2021-09-23 06:33:59 -05:00 committed by GitHub
parent 8361114e2e
commit 5fe712cca6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
186 changed files with 42 additions and 43 deletions

View file

@ -27,7 +27,7 @@ pipeline:
- DATABASE_DRIVER=postgres
- DATABASE_CONFIG=host=postgres user=postgres dbname=postgres sslmode=disable
commands:
- go test -timeout 30s github.com/woodpecker-ci/woodpecker/store/datastore
- go test -timeout 30s github.com/woodpecker-ci/woodpecker/server/store/datastore
test-mysql:
image: golang:1.16
@ -36,7 +36,7 @@ pipeline:
- DATABASE_DRIVER=mysql
- DATABASE_CONFIG=root@tcp(mysql:3306)/test?parseTime=true
commands:
- go test -timeout 30s github.com/woodpecker-ci/woodpecker/store/datastore
- go test -timeout 30s github.com/woodpecker-ci/woodpecker/server/store/datastore
build-frontend:
image: node:10.17.0-stretch

View file

@ -42,7 +42,7 @@ import (
woodpeckerGrpcServer "github.com/woodpecker-ci/woodpecker/server/grpc"
"github.com/woodpecker-ci/woodpecker/server/router"
"github.com/woodpecker-ci/woodpecker/server/router/middleware"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/gin-gonic/contrib/ginrus"
"github.com/sirupsen/logrus"

View file

@ -36,9 +36,9 @@ import (
"github.com/woodpecker-ci/woodpecker/remote/gitlab3"
"github.com/woodpecker-ci/woodpecker/remote/gogs"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/woodpecker-ci/woodpecker/server/store/datastore"
"github.com/woodpecker-ci/woodpecker/server/web"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/store/datastore"
"golang.org/x/sync/errgroup"
"github.com/urfave/cli"

View file

@ -25,7 +25,7 @@ import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
)
var (

View file

@ -30,13 +30,12 @@ import (
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
"github.com/woodpecker-ci/woodpecker/cncd/queue"
"github.com/woodpecker-ci/woodpecker/remote"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/remote"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/woodpecker-ci/woodpecker/server/shared"
"github.com/woodpecker-ci/woodpecker/server/store"
)
func GetBuilds(c *gin.Context) {

View file

@ -22,7 +22,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
)
// FileList gets a list file by build.

View file

@ -34,7 +34,6 @@ import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/remote"
"github.com/woodpecker-ci/woodpecker/shared/token"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/frontend/yaml"
"github.com/woodpecker-ci/woodpecker/cncd/pipeline/pipeline/rpc"
@ -42,6 +41,7 @@ import (
"github.com/woodpecker-ci/woodpecker/cncd/queue"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/shared"
"github.com/woodpecker-ci/woodpecker/server/store"
)
var skipRe = regexp.MustCompile(`\[(?i:ci *skip|skip *ci)\]`)

View file

@ -23,9 +23,9 @@ import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/remote"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/woodpecker-ci/woodpecker/shared/httputil"
"github.com/woodpecker-ci/woodpecker/shared/token"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

View file

@ -27,8 +27,8 @@ import (
"github.com/woodpecker-ci/woodpecker/remote"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/woodpecker-ci/woodpecker/shared/token"
"github.com/woodpecker-ci/woodpecker/store"
)
func PostRepo(c *gin.Context) {

View file

@ -27,7 +27,7 @@ import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

View file

@ -28,8 +28,8 @@ import (
"github.com/woodpecker-ci/woodpecker/remote"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/woodpecker-ci/woodpecker/server/shared"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/woodpecker-ci/woodpecker/shared/token"
"github.com/woodpecker-ci/woodpecker/store"
)
func GetSelf(c *gin.Context) {

View file

@ -22,7 +22,7 @@ import (
"github.com/gorilla/securecookie"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
)
func GetUsers(c *gin.Context) {

View file

@ -16,7 +16,7 @@ package api
import (
"github.com/gin-gonic/gin"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/woodpecker-ci/woodpecker/version"
)

View file

@ -42,7 +42,7 @@ import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/remote"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/woodpecker-ci/expr"
)

View file

@ -20,7 +20,7 @@ import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/remote"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"

View file

@ -18,8 +18,8 @@ import (
"net/http"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/woodpecker-ci/woodpecker/shared/token"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/gin-gonic/gin"
)

View file

@ -16,7 +16,7 @@ package middleware
import (
"github.com/urfave/cli"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/gin-gonic/gin"
)

View file

@ -19,7 +19,7 @@ import (
"github.com/woodpecker-ci/woodpecker/remote"
"github.com/woodpecker-ci/woodpecker/server/router/middleware/session"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"

View file

@ -19,7 +19,7 @@ import (
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/remote"
"github.com/woodpecker-ci/woodpecker/store"
"github.com/woodpecker-ci/woodpecker/server/store"
)
// UserSyncer syncs the user repository and permissions.

View file

@ -20,7 +20,7 @@ import (
"github.com/russross/meddler"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/store/datastore/sql"
"github.com/woodpecker-ci/woodpecker/server/store/datastore/sql"
)
func (db *datastore) GetBuild(id int64) (*model.Build, error) {

View file

@ -19,7 +19,7 @@ import (
"github.com/russross/meddler"
"github.com/woodpecker-ci/woodpecker/model"
"github.com/woodpecker-ci/woodpecker/store/datastore/sql"
"github.com/woodpecker-ci/woodpecker/server/store/datastore/sql"
)
func (db *datastore) ConfigsForBuild(buildID int64) ([]*model.Config, error) {

View file

@ -18,9 +18,9 @@ import (
"database/sql"
"errors"
"github.com/woodpecker-ci/woodpecker/store/datastore/ddl/mysql"
"github.com/woodpecker-ci/woodpecker/store/datastore/ddl/postgres"
"github.com/woodpecker-ci/woodpecker/store/datastore/ddl/sqlite"
"github.com/woodpecker-ci/woodpecker/server/store/datastore/ddl/mysql"
"github.com/woodpecker-ci/woodpecker/server/store/datastore/ddl/postgres"
"github.com/woodpecker-ci/woodpecker/server/store/datastore/ddl/sqlite"
)
// Supported database drivers

Some files were not shown because too many files have changed in this diff Show more