mirror of https://github.com/kubevela/kubevela.git
Refine CI build (#196)
* Refine CI build remove vela binary build during e2e-test, instead use the binary after make build * update old command `vela system:init`
This commit is contained in:
parent
62937e1eb0
commit
8da6e93480
|
|
@ -34,6 +34,9 @@ jobs:
|
|||
with:
|
||||
version: "v0.7.0"
|
||||
|
||||
- name: Run Make
|
||||
run: make
|
||||
|
||||
- name: Run e2e tests
|
||||
run: |
|
||||
make e2e-setup
|
||||
|
|
@ -41,8 +44,5 @@ jobs:
|
|||
make e2e-api-test
|
||||
make e2e-cleanup
|
||||
|
||||
- name: Run Make
|
||||
run: make
|
||||
|
||||
- name: Run Make test
|
||||
run: make test
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -43,7 +43,7 @@ docker-push:
|
|||
e2e-setup:
|
||||
ginkgo version
|
||||
ginkgo -v -r e2e/setup
|
||||
/tmp/vela dashboard & # Somehow API server service doesn't start during setup in Github environment
|
||||
bin/vela dashboard &
|
||||
|
||||
e2e-test:
|
||||
# Run e2e test
|
||||
|
|
@ -54,4 +54,4 @@ e2e-api-test:
|
|||
ginkgo -v -r e2e/apiserver
|
||||
|
||||
e2e-cleanup:
|
||||
# Clean up
|
||||
# Clean up
|
||||
|
|
|
|||
15
e2e/cli.go
15
e2e/cli.go
|
|
@ -7,23 +7,16 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/onsi/gomega"
|
||||
|
||||
"github.com/onsi/ginkgo"
|
||||
"github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var (
|
||||
rudrPath = "/tmp"
|
||||
)
|
||||
var rudrPath = GetCliBinary()
|
||||
|
||||
//GetCliBinary is to build rudr binary.
|
||||
func GetCliBinary() (string, error) {
|
||||
func GetCliBinary() string {
|
||||
cwd, _ := os.Getwd()
|
||||
mainPath := path.Join(cwd, "../../cmd/vela/main.go")
|
||||
cmd := exec.Command("go", "build", "-o", path.Join(rudrPath, "vela"), mainPath)
|
||||
_, err := cmd.Output()
|
||||
return rudrPath, err
|
||||
return path.Join(cwd, "../..", "./bin")
|
||||
}
|
||||
|
||||
func Exec(cli string) (string, error) {
|
||||
|
|
@ -45,8 +38,6 @@ func AsyncExec(cli string) (*gexec.Session, error) {
|
|||
}
|
||||
|
||||
func BeforeSuit() {
|
||||
_, err := GetCliBinary()
|
||||
gomega.Expect(err).NotTo(gomega.HaveOccurred())
|
||||
Exec("vela system init")
|
||||
//Without this line, will hit issue like `<string>: Error: unknown command "scale" for "vela"`
|
||||
Exec("vela system update")
|
||||
|
|
|
|||
Loading…
Reference in New Issue