Skip to content

Commit 1e765a8

Browse files
committed
Merge pull request #340 from arschles/docker-build-client
fix(Makefile,glide.yaml,glide.lock): build client code inside a Docker container
2 parents 78b3dc2 + a09737a commit 1e765a8

3 files changed

Lines changed: 37 additions & 28 deletions

File tree

client/Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ export GO15VENDOREXPERIMENT=1
33
# the filepath to this repository, relative to $GOPATH/src
44
repo_path = github.com/deis/workflow/client
55

6+
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.4.0
7+
DEV_ENV_WORK_DIR := /go/src/${repo_path}
8+
DEV_ENV_PREFIX := docker run --rm -e GO15VENDOREXPERIMENT=1 -e CGO_ENABLED=0 -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR}
9+
DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE}
10+
611
GO_FILES = $(wildcard *.go)
712
GO_PACKAGES = cmd controller/api controller/client $(wildcard controller/models/*) parser $(wildcard pkg/*)
813
GO_PACKAGES_REPO_PATH = $(addprefix $(repo_path)/,$(GO_PACKAGES))
@@ -19,10 +24,13 @@ define check-static-binary
1924
endef
2025

2126
bootstrap:
22-
glide -y glide.yaml install
27+
${DEV_ENV_CMD} glide install
28+
29+
glideup:
30+
${DEV_ENV_CMD} glide up
2331

2432
build:
25-
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags '-s' -o deis .
33+
${DEV_ENV_CMD} go build -a -installsuffix cgo -ldflags '-s' -o deis .
2634
@$(call check-static-binary,deis)
2735

2836
install: build

client/glide.lock

Lines changed: 22 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/glide.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
parent: null
22
package: main
3+
ignore:
4+
- appengine
5+
- appengine/user
6+
- appengine/datastore
7+
- appengine/memcache
38
import:
49
- package: github.com/deis/pkg
510
subpackages:

0 commit comments

Comments
 (0)