mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-09 21:27:22 +02:00
clean up makefile
This commit is contained in:
@@ -34,13 +34,11 @@ GO_LDFLAGS += -X $(VERSION_PACKAGE).version=$(VERSION)
|
||||
GO_LDFLAGS += -w -s # Drop debugging symbols.
|
||||
GO_LDFLAGS += '
|
||||
|
||||
GO_BUILD_TAGS := "containers_image_ostree_stub containers_image_openpgp exclude_graphdriver_devicemapper exclude_graphdriver_btrfs exclude_graphdriver_overlay"
|
||||
|
||||
EXECUTOR_PACKAGE = $(REPOPATH)/cmd/executor
|
||||
KANIKO_PROJECT = $(REPOPATH)/kaniko
|
||||
|
||||
out/executor: $(GO_FILES)
|
||||
GOARCH=$(GOARCH) GOOS=linux CGO_ENABLED=0 go build -ldflags $(GO_LDFLAGS) -tags $(GO_BUILD_TAGS) -o $@ $(EXECUTOR_PACKAGE)
|
||||
GOARCH=$(GOARCH) GOOS=linux CGO_ENABLED=0 go build -ldflags $(GO_LDFLAGS) -o $@ $(EXECUTOR_PACKAGE)
|
||||
|
||||
.PHONY: test
|
||||
test: out/executor
|
||||
@@ -51,5 +49,5 @@ integration-test:
|
||||
@ ./integration-test.sh
|
||||
|
||||
.PHONY: images
|
||||
images: out/executor
|
||||
images:
|
||||
docker build -t $(REGISTRY)/executor:latest -f deploy/Dockerfile .
|
||||
|
||||
+2
-3
@@ -14,11 +14,10 @@
|
||||
|
||||
# Builds the static Go image to execute in a Kubernetes job
|
||||
|
||||
FROM golang
|
||||
FROM golang:1.10
|
||||
WORKDIR /go/src/github.com/GoogleContainerTools/kaniko
|
||||
RUN apt-get update && apt-get install -y make
|
||||
COPY . .
|
||||
RUN make -B
|
||||
RUN make
|
||||
|
||||
FROM scratch
|
||||
COPY --from=0 /go/src/github.com/GoogleContainerTools/kaniko/out/executor /kaniko/executor
|
||||
|
||||
@@ -21,7 +21,7 @@ GREEN='\033[0;32m'
|
||||
RESET='\033[0m'
|
||||
|
||||
echo "Running go tests..."
|
||||
go test -cover -v -tags "containers_image_ostree_stub containers_image_openpgp exclude_graphdriver_devicemapper exclude_graphdriver_btrfs" -timeout 60s `go list ./... | grep -v vendor` | sed ''/PASS/s//$(printf "${GREEN}PASS${RESET}")/'' | sed ''/FAIL/s//$(printf "${RED}FAIL${RESET}")/''
|
||||
go test -cover -v -timeout 60s `go list ./... | grep -v vendor` | sed ''/PASS/s//$(printf "${GREEN}PASS${RESET}")/'' | sed ''/FAIL/s//$(printf "${RED}FAIL${RESET}")/''
|
||||
GO_TEST_EXIT_CODE=${PIPESTATUS[0]}
|
||||
if [[ $GO_TEST_EXIT_CODE -ne 0 ]]; then
|
||||
exit $GO_TEST_EXIT_CODE
|
||||
|
||||
Reference in New Issue
Block a user