diff --git a/.travis.yml b/.travis.yml index b85d3832b..5f3ebbb63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,3 +7,4 @@ go_import_path: github.com/GoogleContainerTools/kaniko script: - make test + - make images diff --git a/Makefile b/Makefile index 4b9cb25df..64701b087 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,7 @@ GO_LDFLAGS += ' EXECUTOR_PACKAGE = $(REPOPATH)/cmd/executor WARMER_PACKAGE = $(REPOPATH)/cmd/warmer KANIKO_PROJECT = $(REPOPATH)/kaniko +BUILD_ARG ?= out/executor: $(GO_FILES) GOARCH=$(GOARCH) GOOS=linux CGO_ENABLED=0 go build -ldflags $(GO_LDFLAGS) -o $@ $(EXECUTOR_PACKAGE) @@ -55,6 +56,7 @@ integration-test: .PHONY: images images: - docker build -t $(REGISTRY)/executor:latest -f deploy/Dockerfile . - docker build -t $(REGISTRY)/executor:debug -f deploy/Dockerfile_debug . - docker build -t $(REGISTRY)/warmer:latest -f deploy/Dockerfile_warmer . + docker build ${BUILD_ARG} -t $(REGISTRY)/executor:latest -f deploy/Dockerfile . + docker build ${BUILD_ARG} -t $(REGISTRY)/executor:debug -f deploy/Dockerfile_debug . + docker build ${BUILD_ARG} -t $(REGISTRY)/warmer:latest -f deploy/Dockerfile_warmer . + diff --git a/README.md b/README.md index 44ccb5876..4b49b1c21 100644 --- a/README.md +++ b/README.md @@ -475,6 +475,7 @@ Set this flag to indicate which build stage is the target build stage. #### --tarPath Set this flag as `--tarPath=` to save the image as a tarball at path instead of pushing the image. +You need to set `--destination` as well (for example `--destination=image`). #### --verbosity diff --git a/deploy/Dockerfile_debug b/deploy/Dockerfile_debug index 65428e864..c1e4107f7 100644 --- a/deploy/Dockerfile_debug +++ b/deploy/Dockerfile_debug @@ -32,13 +32,13 @@ FROM gcr.io/cloud-builders/bazel:latest RUN git clone https://github.com/GoogleContainerTools/distroless.git WORKDIR /distroless RUN bazel build //experimental/busybox:busybox_tar -RUN tar -C /distroless/bazel-genfiles/experimental/busybox/ -xf /distroless/bazel-genfiles/experimental/busybox/busybox.tar +RUN tar -C /distroless/bazel-bin/experimental/busybox/ -xf /distroless/bazel-bin/experimental/busybox/busybox.tar FROM scratch COPY --from=0 /go/src/github.com/GoogleContainerTools/kaniko/out/* /kaniko/ COPY --from=0 /usr/local/bin/docker-credential-gcr /kaniko/docker-credential-gcr COPY --from=0 /go/src/github.com/awslabs/amazon-ecr-credential-helper/bin/linux-amd64/docker-credential-ecr-login /kaniko/docker-credential-ecr-login -COPY --from=1 /distroless/bazel-genfiles/experimental/busybox/busybox/ /busybox/ +COPY --from=1 /distroless/bazel-bin/experimental/busybox/busybox/ /busybox/ # Declare /busybox as a volume to get it automatically whitelisted VOLUME /busybox COPY files/ca-certificates.crt /kaniko/ssl/certs/