Skip to content

Commit

Permalink
update files from original repository
Browse files Browse the repository at this point in the history
  • Loading branch information
hitomitak committed Apr 10, 2017
2 parents f51fad9 + 10df764 commit 6abeac3
Show file tree
Hide file tree
Showing 6 changed files with 743 additions and 326 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine
FROM alpine:3.4

MAINTAINER Gunjan Patel <[email protected]>

Expand Down
41 changes: 20 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,46 +1,45 @@
CALICO_BUILD?=hitomitak/go-build-ppc64le
SRC_FILES=$(shell find . -type f -name '*.go')
GOBGPD_VERSION?=$(shell git describe --tags --dirty)
PACKAGE_NAME?=github.com/projectcalico/calico-bgp-daemon
LOCAL_USER_ID?=$(shell id -u $$USER)
#CONTAINER_NAME?=calico/gobgpd
#


build-containerized: clean vendor dist/gobgp
mkdir -p dist
docker run --rm \
-v ${PWD}:/go/src/github.com/projectcalico/calico-bgp-daemon \
-v ${PWD}/dist:/go/src/github.com/projectcalico/calico-bgp-daemon/dist \
-e LOCAL_USER_ID=`id -u $$USER` \
-v $(CURDIR):/go/src/$(PACKAGE_NAME) \
-v $(CURDIR)/dist:/go/src/$(PACKAGE_NAME)/dist \
-e LOCAL_USER_ID=$(LOCAL_USER_ID) \
$(CALICO_BUILD) sh -c '\
cd /go/src/github.com/projectcalico/calico-bgp-daemon && \
cd /go/src/$(PACKAGE_NAME) && \
make binary'
vendor: glide
docker run --rm -v ${PWD}:/go/src/github.com/projectcalico/calico-bgp-daemon:rw --entrypoint=sh \
glide-ppc64le -c \
'cd /go/src/github.com/projectcalico/calico-bgp-daemon; \
glide install -strip-vcs -strip-vendor --cache; \
chown $(shell id -u):$(shell id -u) -R vendor'
vendor: glide.yaml
mkdir -p $(HOME)/.glide
docker run --rm \
-v $(CURDIR):/go/src/$(PACKAGE_NAME):rw \
-v $(HOME)/.glide:/home/user/.glide:rw --entrypoint=sh \
glide-ppc64le -c ' \
cd /go/src/$(PACKAGE_NAME) && \
glide install -strip-vendor'

glide:

glide.yaml:
docker build -t glide-ppc64le - < Dockerfile.glide

binary: dist/gobgpd

dist/gobgp:
mkdir -p $(@D)
docker run --rm -v `pwd`/dist:/go/code \
-e LOCAL_USER_ID=`id -u $$USER` \
$(CALICO_BUILD) sh -c \
'mkdir -p /go/code && go get github.com/osrg/gobgp/gobgp && cp /go/bin/gobgp /go/code && \
chown $(shell id -u):$(shell id -g) /go/code/gobgp'
docker run --rm -v $(CURDIR)/dist:/go/bin \
-e LOCAL_USER_ID=$(LOCAL_USER_ID) \
$(CALICO_BUILD) go get -v github.com/osrg/gobgp/gobgp

dist/gobgpd: $(SRC_FILES)
mkdir -p $(@D)
go build -v -o dist/calico-bgp-daemon \
-ldflags "-X main.VERSION=$(GOBGPD_VERSION) -s -w" main.go

#$(CONTAINER_NAME): build-containerized
# docker build -t $(CONTAINER_NAME) .
-ldflags "-X main.VERSION=$(GOBGPD_VERSION) -s -w" main.go ipam.go

release: clean
ifndef VERSION
Expand Down
64 changes: 37 additions & 27 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 6 additions & 16 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,29 @@
package: .
package: github.com/projectcalico/calico-bgp-daemon
import:
- package: github.com/Sirupsen/logrus
version: v0.11.2
- package: github.com/coreos/etcd
version: ~3.1.0-alpha.1
version: v3.1.1
subpackages:
- client
- pkg/transport
- package: github.com/osrg/gobgp
version: ee8ce99e2df1f732ef515e20fb3054c0cff0249b
version: v1.16.0
subpackages:
- api
- config
- packet/bgp
- server
- table
- package: github.com/projectcalico/libcalico-go
version: v1.0.0-rc6
version: v1.1.3
subpackages:
- lib/api
- lib/api/unversioned
- lib/backend
- lib/backend/api
- lib/backend/compat
- lib/backend/etcd
- lib/backend/k8s
- lib/backend/model
- lib/client
- lib/errors
- lib/hwm
- lib/net
- lib/numorstring
- lib/scope
- package: github.com/vishvananda/netlink
- package: golang.org/x/net
subpackages:
- context
- package: google.golang.org/grpc
version: 0d9891286aca15aeb2b0a73be9f5946c3cfefa85
- package: gopkg.in/tomb.v2
Loading

0 comments on commit 6abeac3

Please sign in to comment.