Revert "release: skip downloading go modules in container image builds (#821)"
This reverts commit ba0891b7b7.
			
			
This commit is contained in:
		
							parent
							
								
									ba0891b7b7
								
							
						
					
					
						commit
						e24c15324b
					
				
							
								
								
									
										11
									
								
								Dockerfile
								
								
								
								
							
							
						
						
									
										11
									
								
								Dockerfile
								
								
								
								
							|  | @ -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 | FROM alpine:3.8 | ||||||
| 
 | 
 | ||||||
| RUN apk add --no-cache ca-certificates git bash curl jq | 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/hypnoglow/helm-s3.git && \ | ||||||
|     helm plugin install https://github.com/aslafy-z/helm-git.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"] | CMD ["/usr/local/bin/helmfile"] | ||||||
|  |  | ||||||
							
								
								
									
										8
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										8
									
								
								Makefile
								
								
								
								
							|  | @ -26,7 +26,7 @@ integration: | ||||||
| .PHONY: integration | .PHONY: integration | ||||||
| 
 | 
 | ||||||
| cross: | 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 | .PHONY: cross | ||||||
| 
 | 
 | ||||||
| static-linux: | static-linux: | ||||||
|  | @ -50,13 +50,9 @@ release: pristine cross | ||||||
| 	@ghr -b ${BODY} -t ${GITHUB_TOKEN} -u ${ORG} -recreate ${TAG} dist | 	@ghr -b ${BODY} -t ${GITHUB_TOKEN} -u ${ORG} -recreate ${TAG} dist | ||||||
| .PHONY: release | .PHONY: release | ||||||
| 
 | 
 | ||||||
| image: static-linux/in-docker | image: | ||||||
| 	docker build -t quay.io/${ORG}/helmfile:${TAG} . | 	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 | run: image | ||||||
| 	docker run --rm -it -t quay.io/${ORG}/helmfile:${TAG} sh | 	docker run --rm -it -t quay.io/${ORG}/helmfile:${TAG} sh | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue