Move go build to image-utils

This commit is contained in:
Manjunath A Kumatagi
2017-06-28 19:19:25 +05:30
parent c8a08afc8c
commit 60778cdaa4
18 changed files with 89 additions and 104 deletions

View File

@@ -12,16 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
BIN=netexec
SRCS=netexec
ARCH ?= amd64
TARGET ?= $(CURDIR)
GOLANG_VERSION ?= latest
SRC_DIR = $(notdir $(shell pwd))
export
bin:
docker run --rm -it -v $(TARGET):$(TARGET):Z -v `pwd`/../../../:/go/src/k8s.io/kubernetes:Z \
golang:$(GOLANG_VERSION) \
/bin/bash -c "\
cd /go/src/k8s.io/kubernetes/test/images/netexec && \
CGO_ENABLED=0 GOARM=$(GOARM) GOARCH=$(ARCH) go build -a -installsuffix cgo --ldflags '-w' -o $(TARGET)/$(BIN) ."
../image-util.sh bin $(SRCS)
.PHONY: bin