Skip to content

Commit 2eecea1

Browse files
committed
Move presubmit to a make rule. Update docs to not use make all unless necessary.
Signed-off-by: Vishnu kannan <[email protected]>
1 parent c1f3340 commit 2eecea1

File tree

5 files changed

+13
-38
lines changed

5 files changed

+13
-38
lines changed

Makefile

+8-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
GO := go
1515
pkgs = $(shell $(GO) list ./... | grep -v vendor)
1616

17-
all: format vet build test
17+
all: presubmit build test
1818

1919
test:
2020
@echo ">> running tests"
@@ -43,4 +43,10 @@ release:
4343
docker:
4444
@docker build -t cadvisor:$(shell git rev-parse --short HEAD) -f deploy/Dockerfile .
4545

46-
.PHONY: all build docker format release test test-integration vet
46+
presubmit: vet
47+
@echo ">> checking go formatting"
48+
@./build/check_gofmt.sh .
49+
@echo ">> checking file boilerplate"
50+
@./build/check_boilerplate.sh
51+
52+
.PHONY: all build docker format release test test-integration vet presubmit

build/jenkins_e2e.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ BUILDER=${BUILDER:-false} # Whether this is running a PR builder job.
2222
export GO_FLAGS="-race"
2323
export GORACE="halt_on_error=1"
2424

25-
./build/presubmit.sh
25+
make
2626
go build -tags test github.com/google/cadvisor/integration/runner
2727

2828
# Nodes that are currently stable. When tests fail on a specific node, and the failure is not remedied within a week, that node will be removed from this list.

build/presubmit.sh

-22
This file was deleted.

deploy/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
set -e
1818
set -x
1919

20-
make
20+
make build
2121

2222
docker build -t google/cadvisor:beta .

docs/development/build.md

+3-12
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
## Installing Dependencies
66

7-
cAdvisor is written in the [Go](http://golang.org) programming language. If you haven't set up a Go development environment, please follow [these instructions](http://golang.org/doc/code.html) to install go tool and set up GOPATH. Ensure that your version of Go is at least 1.3. Note that the version of Go in package repositories of some operating systems is outdated, so please [download](https://golang.org/dl/) the latest version.
7+
cAdvisor is written in the [Go](http://golang.org) programming language. If you haven't set up a Go development environment, please follow [these instructions](http://golang.org/doc/code.html) to install go tool and set up GOPATH. Note that the version of Go in package repositories of some operating systems is outdated, so please [download](https://golang.org/dl/) the latest version.
88

9-
**Note**: cAdvisor requires Go 1.5 to build.
9+
**Note**: cAdvisor requires Go 1.6 to build.
1010

1111
After setting up Go, you should be able to `go get` cAdvisor as expected (we use `-d` to only download):
1212

@@ -19,7 +19,7 @@ $ go get -d github.com/google/cadvisor
1919
At this point you can build cAdvisor from the source folder:
2020

2121
```
22-
$GOPATH/src/github.com/google/cadvisor $ make
22+
$GOPATH/src/github.com/google/cadvisor $ make build
2323
```
2424

2525
or run only unit tests:
@@ -38,12 +38,3 @@ Now you can run the built binary:
3838
$GOPATH/src/github.com/google/cadvisor $ sudo ./cadvisor
3939
```
4040

41-
## Compiling Assets
42-
43-
If you modify files in the /assets folder, you will need to rebuild the assets:
44-
45-
```
46-
$GOPATH/src/github.com/google/cadvisor $ ./build/assets.sh
47-
$GOPATH/src/github.com/google/cadvisor $ make
48-
```
49-

0 commit comments

Comments
 (0)