mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-03 00:05:09 +02:00
Revert "release: skip downloading go modules in container image builds (#821)"
This reverts commit ba0891b7b7.
This commit is contained in:
+10
-1
@@ -1,3 +1,12 @@
|
||||
FROM golang:1.12.4-alpine3.9 as builder
|
||||
|
||||
RUN apk add --no-cache make git
|
||||
WORKDIR /workspace/helmfile
|
||||
COPY . /workspace/helmfile
|
||||
RUN make static-linux
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
FROM alpine:3.8
|
||||
|
||||
RUN apk add --no-cache ca-certificates git bash curl jq
|
||||
@@ -27,6 +36,6 @@ RUN helm plugin install https://github.com/databus23/helm-diff && \
|
||||
helm plugin install https://github.com/hypnoglow/helm-s3.git && \
|
||||
helm plugin install https://github.com/aslafy-z/helm-git.git
|
||||
|
||||
COPY dist/helmfile_linux_amd64 /usr/local/bin/helmfile
|
||||
COPY --from=builder /workspace/helmfile/dist/helmfile_linux_amd64 /usr/local/bin/helmfile
|
||||
|
||||
CMD ["/usr/local/bin/helmfile"]
|
||||
|
||||
@@ -26,7 +26,7 @@ integration:
|
||||
.PHONY: integration
|
||||
|
||||
cross:
|
||||
env CGO_ENABLED=0 gox -os '!openbsd !freebsd !netbsd' -arch '!arm !mips !mipsle !mips64 !mips64le !s390x' -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags '-X main.Version=${TAG}' ${TARGETS}
|
||||
env CGO_ENABLED=0 gox -os '!openbsd !freebsd !netbsd' -arch '!arm !mips !mipsle !mips64 !mips64le' -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags '-X main.Version=${TAG}' ${TARGETS}
|
||||
.PHONY: cross
|
||||
|
||||
static-linux:
|
||||
@@ -50,13 +50,9 @@ release: pristine cross
|
||||
@ghr -b ${BODY} -t ${GITHUB_TOKEN} -u ${ORG} -recreate ${TAG} dist
|
||||
.PHONY: release
|
||||
|
||||
image: static-linux/in-docker
|
||||
image:
|
||||
docker build -t quay.io/${ORG}/helmfile:${TAG} .
|
||||
|
||||
static-linux/in-docker:
|
||||
if [ -f dist/helmfile_linux_amd64 ]; then echo removing dist/helmfile_linux_amd64; rm dist/helmfile_linux_amd64; fi
|
||||
docker run -v $(HOME)/go:/go -v $(PWD):/workspace/helmfile -w /workspace/helmfile golang:1.12.4-alpine3.9 sh -c 'apk add --no-cache make git && make static-linux'
|
||||
|
||||
run: image
|
||||
docker run --rm -it -t quay.io/${ORG}/helmfile:${TAG} sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user