Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate and ensure setup before e2e-build #375

Merged
merged 4 commits into from
Apr 12, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ scheduler:
discovery:
$(GO) -ldflags '$(LDFLAGS)' -o images/tidb-operator/bin/tidb-discovery cmd/discovery/main.go

e2e-setup:
# ginkgo doesn't work with retool for Go 1.11
@GO111MODULE=on CGO_ENABLED=0 go get github.com/onsi/ginkgo@v1.6.0

e2e-docker-push: e2e-docker
docker push "${DOCKER_REGISTRY}/pingcap/tidb-operator-e2e:latest"

Expand All @@ -50,7 +54,7 @@ e2e-docker: e2e-build
cp -r charts/tidb-backup tests/images/e2e
docker build -t "${DOCKER_REGISTRY}/pingcap/tidb-operator-e2e:latest" tests/images/e2e

e2e-build:
e2e-build: e2e-setup
$(GO) -ldflags '$(LDFLAGS)' -o tests/images/e2e/bin/e2e tests/cmd/e2e/main.go

stability-test-build:
Expand All @@ -74,10 +78,9 @@ check-all: lint check-static check-shadow check-gosec megacheck errcheck
check-setup:
@which retool >/dev/null 2>&1 || go get github.com/twitchtv/retool
@GO111MODULE=off retool sync
# ginkgo and govet doesn't work with retool for Go 1.11
# govet doesn't work with retool for Go 1.11
# so install separately
@GO111MODULE=on CGO_ENABLED=0 go get github.com/dnephin/govet@4a96d43e39d340b63daa8bc5576985aa599885f6
@GO111MODULE=on CGO_ENABLED=0 go get github.com/onsi/ginkgo@v1.6.0

check: check-setup lint check-static

Expand Down
17 changes: 8 additions & 9 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@ $ git checkout -b myfeature

### Step 4: Develop

#### Setup

Make sure all the related tools are properly installed.

```sh
$ make check-setup
```

#### Edit the code

You can now edit the code on the `myfeature` branch.
Expand Down Expand Up @@ -152,7 +144,14 @@ $ git rebase upstream/master

### Step 6: Commit

Commit your changes.
Before you commit, make sure the all the checks and unit tests are passed:
aylei marked this conversation as resolved.
Show resolved Hide resolved

```sh
$ make check
$ meke test
```

Then commit your changes.

```sh
$ git commit
Expand Down