update scripts and docs to not mention godep for builds

Signed-off-by: Vishnu kannan <vishnuk@google.com>
This commit is contained in:
Vishnu kannan 2016-07-11 12:31:03 -07:00
parent de4af1288b
commit 38ea12a533
19 changed files with 28 additions and 36 deletions

View File

@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
GO := godep go
GO := go
pkgs = $(shell $(GO) list ./...)
all: format build test

View File

@ -95,7 +95,7 @@ def file_passes(filename, refs, regexs):
def file_extension(filename):
return os.path.splitext(filename)[1].split(".")[-1].lower()
skipped_dirs = ['Godeps', 'third_party', '_gopath', '_output', '.git']
skipped_dirs = ['Godeps', 'vendor', 'third_party', '_gopath', '_output', '.git']
def normalize_files(files):
newfiles = []
for pathname in files:

View File

@ -68,6 +68,6 @@ if [ "$RELEASE" == "true" ]; then
echo "Building release candidate with -ldflags $ldflags"
fi
GOBIN=$PWD godep go "$GO_CMD" ${GO_FLAGS} -ldflags "${ldflags}" "${repo_path}"
GOBIN=$PWD go "$GO_CMD" ${GO_FLAGS} -ldflags "${ldflags}" "${repo_path}"
exit 0

View File

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
GO_FILES=$(find . -not -wholename "*Godeps*" -name "*.go")
GO_FILES=$(find . -not -wholename "*Godeps*" -not -wholename "*vendor*" -name "*.go")
for FILE in ${GO_FILES}; do
ERRS=`grep 'fmt.Errorf("[A-Z]' ${FILE}`

View File

@ -21,7 +21,7 @@ if [ $# -ne 1 ]; then
fi
# Check formatting on non Godep'd code.
GOFMT_PATHS=$(find . -not -wholename "*.git*" -not -wholename "*Godeps*" -not -name "." -type d)
GOFMT_PATHS=$(find . -not -wholename "*.git*" -not -wholename "*Godeps*" -not -wholename "*vendor*" -not -name "." -type d)
# Find any files with gofmt problems
BAD_FILES=$(gofmt -s -l $GOFMT_PATHS)

View File

@ -57,4 +57,4 @@ while [ "$(curl -Gs http://localhost:8080/healthz)" != "ok" ]; do
done
echo ">> running integration tests against local cAdvisor"
godep go test github.com/google/cadvisor/integration/tests/... --vmodule=*=2
go test github.com/google/cadvisor/integration/tests/... --vmodule=*=2

View File

@ -22,9 +22,8 @@ BUILDER=${BUILDER:-false} # Whether this is running a PR builder job.
export GO_FLAGS="-race"
export GORACE="halt_on_error=1"
go get -u github.com/tools/godep
./build/presubmit.sh
godep go build -tags test github.com/google/cadvisor/integration/runner
go build -tags test github.com/google/cadvisor/integration/runner
# 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.
golden_nodes=(

View File

@ -20,5 +20,5 @@ set -x
./build/check_gofmt.sh .
./build/check_boilerplate.sh
go vet github.com/google/cadvisor/...
godep go test -v -race -test.short github.com/google/cadvisor/...
godep go build github.com/google/cadvisor
go test -v -race -test.short github.com/google/cadvisor/...
go build github.com/google/cadvisor

View File

@ -17,6 +17,6 @@
set -e
set -x
godep go build -a github.com/google/cadvisor
make
docker build -t google/cadvisor:beta .

View File

@ -3,8 +3,7 @@ MAINTAINER vmarmol@google.com
RUN apt-get install -y git dmsetup
RUN git clone https://github.com/google/cadvisor.git /go/src/github.com/google/cadvisor
RUN go get github.com/tools/godep
RUN cd /go/src/github.com/google/cadvisor && godep go build .
RUN cd /go/src/github.com/google/cadvisor && make
ENTRYPOINT ["/go/src/github.com/google/cadvisor/cadvisor"]

View File

@ -14,24 +14,18 @@ After setting up Go, you should be able to `go get` cAdvisor as expected (we use
$ go get -d github.com/google/cadvisor
```
We use `godep` so you will need to get that as well:
```
$ go get github.com/tools/godep
```
## Building from Source
At this point you can build cAdvisor from the source folder:
```
$GOPATH/src/github.com/google/cadvisor $ godep go build .
$GOPATH/src/github.com/google/cadvisor $ make
```
or run only unit tests:
```
$GOPATH/src/github.com/google/cadvisor $ godep go test ./... -test.short
$GOPATH/src/github.com/google/cadvisor $ make test
```
For integration tests, see the [integration testing](integration_testing.md) page.
@ -50,6 +44,6 @@ If you modify files in the /assets folder, you will need to rebuild the assets:
```
$GOPATH/src/github.com/google/cadvisor $ ./build/assets.sh
$GOPATH/src/github.com/google/cadvisor $ godep go build .
$GOPATH/src/github.com/google/cadvisor $ make
```

View File

@ -3,7 +3,7 @@
The cAdvisor integration tests can be found in `integration/tests`. These run queries on a running cAdvisor. To run these tests:
```
$ godep go run integration/runner/runner.go -port=PORT <hosts to test>
$ go run integration/runner/runner.go -port=PORT <hosts to test>
```
This will build a cAdvisor from the current repository and start it on the target machine before running the tests.
@ -11,7 +11,7 @@ This will build a cAdvisor from the current repository and start it on the targe
To simply run the tests against an existing cAdvisor:
```
$ godep go test github.com/google/cadvisor/integration/tests/... -host=HOST -port=PORT
$ go test github.com/google/cadvisor/integration/tests/... -host=HOST -port=PORT
```
Note that `HOST` and `PORT` default to `localhost` and `8080` respectively.

View File

@ -30,7 +30,7 @@ if ! git diff --name-only origin/master | grep -c -E "*.go|*.sh" &> /dev/null; t
fi
# Build the runner.
godep go build github.com/google/cadvisor/integration/runner
go build github.com/google/cadvisor/integration/runner
# Run it.
HOSTS=$@

View File

@ -37,7 +37,7 @@ import (
)
// must be able to ssh into hosts without password
// godep go run ./integration/runner/runner.go --logtostderr --v 2 --ssh-config <.ssh/config file> <list of hosts>
// go run ./integration/runner/runner.go --logtostderr --v 2 --ssh-config <.ssh/config file> <list of hosts>
const (
cadvisorBinary = "cadvisor"
@ -180,7 +180,7 @@ func PushAndRunTests(host, testDir string) (result error) {
}
// Run the command
err = RunCommand("godep", "go", "test", "--timeout", testTimeout.String(), "github.com/google/cadvisor/integration/tests/...", "--host", host, "--port", portStr, "--ssh-options", *sshOptions)
err = RunCommand("go", "test", "--timeout", testTimeout.String(), "github.com/google/cadvisor/integration/tests/...", "--host", host, "--port", portStr, "--ssh-options", *sshOptions)
if err == nil {
// On success, break out of retry loop
break

View File

@ -2,12 +2,12 @@ package auth
import "net/http"
/*
/*
Request handlers must take AuthenticatedRequest instead of http.Request
*/
type AuthenticatedRequest struct {
http.Request
/*
/*
Authenticated user name. Current API implies that Username is
never empty, which means that authentication is always done
before calling the request handler.

View File

@ -22,7 +22,7 @@ type DigestAuth struct {
Secrets SecretProvider
PlainTextSecrets bool
/*
/*
Approximate size of Client's Cache. When actual number of
tracked client nonces exceeds
ClientCacheSize+ClientCacheTolerance, ClientCacheTolerance*2
@ -108,7 +108,7 @@ func DigestAuthParams(r *http.Request) map[string]string {
return result
}
/*
/*
Check if request contains valid authentication data. Returns a pair
of username, authinfo where username is the name of the authenticated
user or an empty string and authinfo is the contents for the optional
@ -178,7 +178,7 @@ func (da *DigestAuth) CheckAuth(r *http.Request) (username string, authinfo *str
const DefaultClientCacheSize = 1000
const DefaultClientCacheTolerance = 100
/*
/*
Wrap returns an Authenticator which uses HTTP Digest
authentication. Arguments:
@ -201,7 +201,7 @@ func (a *DigestAuth) Wrap(wrapped AuthenticatedHandlerFunc) http.HandlerFunc {
}
}
/*
/*
JustCheck returns function which converts an http.HandlerFunc into a
http.HandlerFunc which requires authentication. Username is passed as
an extra X-Authenticated-Username header.

View File

@ -3,7 +3,7 @@ package auth
import "encoding/csv"
import "os"
/*
/*
SecretProvider is used by authenticators. Takes user name and realm
as an argument, returns secret required for authentication (HA1 for
digest authentication, properly encrypted password for basic).

2
vendor/github.com/kr/text/wrap.go generated vendored
View File

@ -31,7 +31,7 @@ func WrapBytes(b []byte, lim int) []byte {
// WrapWords is the low-level line-breaking algorithm, useful if you need more
// control over the details of the text wrapping process. For most uses, either
// Wrap or WrapBytes will be sufficient and more convenient.
// Wrap or WrapBytes will be sufficient and more convenient.
//
// WrapWords splits a list of words into lines with minimal "raggedness",
// treating each byte as one unit, accounting for spc units between adjacent

View File

@ -109,7 +109,7 @@ func NewClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth
callHdr := &transport.CallHdr{
Host: cc.authority,
Method: method,
Flush: desc.ServerStreams&&desc.ClientStreams,
Flush: desc.ServerStreams && desc.ClientStreams,
}
if cc.dopts.cp != nil {
callHdr.SendCompress = cc.dopts.cp.Type()