From c5e3431f147ee2ea08d6376053736a0d2eaa7d69 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Thu, 5 Nov 2020 17:57:06 -0800 Subject: [PATCH] build: fix stacker build --- Makefile | 3 ++- stacker.yaml | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a448d1e9..e541c02d 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ COMMIT=$(if $(shell git status --porcelain --untracked-files=no),$(COMMIT_HASH)- CONTAINER_RUNTIME := $(shell command -v podman 2> /dev/null || echo docker) PATH := bin:$(PATH) TMPDIR := $(shell mktemp -d) +STACKER := $(shell which stacker) .PHONY: all all: doc binary binary-minimal debug test check @@ -61,7 +62,7 @@ run-container: .PHONY: binary-stacker binary-stacker: - stacker --roots-dir ${TMPDIR} build --substitute PWD=$$PWD + sudo ${STACKER} build --substitute PWD=$$PWD .PHONY: image image: diff --git a/stacker.yaml b/stacker.yaml index c53e874f..833a1c89 100644 --- a/stacker.yaml +++ b/stacker.yaml @@ -1,19 +1,20 @@ build: from: type: docker - url: docker://golang:1.14.4 + url: docker://golang:1.15.3 binds: - - ${{PWD}} -> /go/src/github.com/anuvu/zot + - ${{PWD}} -> /zotcopy run: | export GO111MODULE=on export GOPATH='/go' export HOME='/root' export PATH='/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' go get -u github.com/swaggo/swag/cmd/swag + mkdir -p /go/src/github.com/anuvu + cd /go/src/github.com/anuvu + git clone /zotcopy zot cd /go/src/github.com/anuvu/zot - go get -u -v -d ./... - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.26.0 - make + make binary build_only: true zot: