Skip to content

Conversation

@roffe
Copy link
Contributor

@roffe roffe commented Apr 10, 2018

Adde option to build in Docker, also a small check so it doesn't ask for sudo password for Docker when on OSX

make BUILD_IN_DOCKER=true will run the go test & kube-router build in golang:alpine, gobgp is already build in docker container.

DEV_SUFFIX?=-git
BUILD_DATE?=$(shell date --iso-8601)
OSX=$(filter Darwin,$(shell uname))
BUILD_DATE?=$(shell date +%Y-%m-%dT%H:%M:%S%z)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to be compat with OSX that does not have the GNU date util

Makefile Outdated
test: gofmt gomoqs ## Runs code quality pipelines (gofmt, tests, coverage, lint, etc)
go test github.com/cloudnativelabs/kube-router github.com/cloudnativelabs/kube-router/app/... github.com/cloudnativelabs/kube-router/utils/
ifeq "$(BUILD_IN_DOCKER)" "true"
$(DOCKER) run -v $(PWD):/go/src/github.com/cloudnativelabs/kube-router -w /go/src/github.com/cloudnativelabs/kube-router golang:alpine \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the docker image here should be at a fixed go version (whatver is being released with kube-router)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed.

if you look at how we compile gobgp further down in the makefile, it's a unspecified docker image there as well that needs to be fixed

I'll add a variable that holds the version for golang:alpine and make sure its used in the whole makefile

@roffe
Copy link
Contributor Author

roffe commented Apr 12, 2018

Locked to golang:1.8.7-alpine, based on what Golang version we built the latest 0.1.0 release with

@andrewsykim
Copy link
Contributor

LGTM

@murali-reddy murali-reddy merged commit dd5d2fa into cloudnativelabs:master Apr 13, 2018
@roffe roffe deleted the osxcompat-1 branch April 13, 2018 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants