mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +00:00
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:
parent
8361114e2e
commit
5fe712cca6
186 changed files with 42 additions and 43 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)\]`)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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) {
|
|
@ -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) {
|
|
@ -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
Loading…
Reference in a new issue