clean up makefile
This commit is contained in:
parent
3705de2298
commit
b9435943ec
6
Makefile
6
Makefile
|
|
@ -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 .
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
2
test.sh
2
test.sh
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue