Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions experiments/tibuild-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ It provide the CD functions for PingCAP, Welcome bros!

## Quick Start


### Design the backend server

go to [design/design.go](./design/design.go) and update it.
go to [internal/service/design/design.go](./internal/service/design/design.go) and update it.

### Design the database

go to [internal/database/schema/](./internal/database/schema/) and update them.

### Generate code from design

> we need the goa tool

run:
```bash
rm -rf gen cmd oci.go
goa gen github.com/PingCAP-QE/ee-apps/tibuild/design
goa example github.com/PingCAP-QE/ee-apps/tibuild/design
go generate -x ./...
```

### Run it
Expand Down
2 changes: 1 addition & 1 deletion experiments/tibuild-v2/cmd/tibuild-cli/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"time"

cli "github.com/PingCAP-QE/ee-apps/tibuild/gen/http/cli/tibuild"
cli "github.com/PingCAP-QE/ee-apps/tibuild/internal/service/gen/http/cli/tibuild"
goahttp "goa.design/goa/v3/http"
goa "goa.design/goa/v3/pkg"
)
Expand Down
9 changes: 5 additions & 4 deletions experiments/tibuild-v2/cmd/tibuild/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import (
"sync"
"time"

artifact "github.com/PingCAP-QE/ee-apps/tibuild/gen/artifact"
devbuild "github.com/PingCAP-QE/ee-apps/tibuild/gen/devbuild"
artifactsvr "github.com/PingCAP-QE/ee-apps/tibuild/gen/http/artifact/server"
devbuildsvr "github.com/PingCAP-QE/ee-apps/tibuild/gen/http/devbuild/server"
"goa.design/clue/debug"
"goa.design/clue/log"
goahttp "goa.design/goa/v3/http"

artifact "github.com/PingCAP-QE/ee-apps/tibuild/internal/service/gen/artifact"
devbuild "github.com/PingCAP-QE/ee-apps/tibuild/internal/service/gen/devbuild"
artifactsvr "github.com/PingCAP-QE/ee-apps/tibuild/internal/service/gen/http/artifact/server"
devbuildsvr "github.com/PingCAP-QE/ee-apps/tibuild/internal/service/gen/http/devbuild/server"
)

// handleHTTPServer starts configures and starts a HTTP server on the given
Expand Down
9 changes: 5 additions & 4 deletions experiments/tibuild-v2/cmd/tibuild/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import (
"sync"
"syscall"

artifact "github.com/PingCAP-QE/ee-apps/tibuild/gen/artifact"
devbuild "github.com/PingCAP-QE/ee-apps/tibuild/gen/devbuild"
tibuild "github.com/PingCAP-QE/ee-apps/tibuild/pkg/impl"
"github.com/rs/zerolog"
"goa.design/clue/debug"
"goa.design/clue/log"

artifact "github.com/PingCAP-QE/ee-apps/tibuild/internal/service/gen/artifact"
devbuild "github.com/PingCAP-QE/ee-apps/tibuild/internal/service/gen/devbuild"
tibuild "github.com/PingCAP-QE/ee-apps/tibuild/pkg/impl"
)

func main() {
Expand Down Expand Up @@ -67,7 +68,7 @@ func main() {
}
{
logger := zerolog.New(os.Stderr).With().Timestamp().Str("service", devbuild.ServiceName).Logger()
devbuildSvc = tibuild.NewDevbuild(&logger)
devbuildSvc = tibuild.NewDevbuild(&logger, nil /* TODO: add db client */)
}
}

Expand Down
41 changes: 0 additions & 41 deletions experiments/tibuild-v2/gen/http/artifact/client/cli.go

This file was deleted.

Loading
Loading